Skip to content

Instantly share code, notes, and snippets.

@pdabrowski6
Created January 12, 2018 15:26
Show Gist options
  • Save pdabrowski6/735063eeeffd89594784c632ee523efb to your computer and use it in GitHub Desktop.
Save pdabrowski6/735063eeeffd89594784c632ee523efb to your computer and use it in GitHub Desktop.
class Describe
attr_reader :context_name
def initialize(context_name, &block)
@context_name = context_name
instance_eval &block
end
def describe(context_name, &block)
Describe.new(context_name, &block)
end
end
## Helper method
def describe(context_name, &block)
Describe.new(context_name, &block)
end
## Our test
describe NumberService do
describe '#number' do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment