Skip to content

Commit

Permalink
Return the created Specification instance from Context::it.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Mar 8, 2012
1 parent b543560 commit ec50915
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mac_bacon.rb
Expand Up @@ -315,7 +315,9 @@ def behaves_like(*names)
def it(description, &block)
return unless description =~ Bacon.restrict_name
block ||= lambda { should.flunk "not implemented" }
@specifications << Specification.new(self, description, block, @before, @after)
spec = Specification.new(self, description, block, @before, @after)
@specifications << spec
spec
end

def describe(*args, &block)
Expand Down

0 comments on commit ec50915

Please sign in to comment.