lib/cucumber/ast/background.rb in aslakhellesoy-cucumber-0.3.2 vs lib/cucumber/ast/background.rb in aslakhellesoy-cucumber-0.3.3
- old
+ new
@@ -30,10 +30,15 @@
@failed = @step_invocations.detect{|step_invocation| step_invocation.exception}
visitor.step_mother.after(hook_context) if @failed
end
def accept_hook?(hook)
- false
+ if hook_context != self
+ hook_context.accept_hook?(hook)
+ else
+ # We have no scenarios
+ false
+ end
end
def failed?
@failed
end