Class: Cucumber::Filters::FireBeforeAllHooks
- Inherits:
-
Object
- Object
- Cucumber::Filters::FireBeforeAllHooks
- Defined in:
- lib/cucumber/filters/fire_before_all_hooks.rb
Overview
Executes all BeforeAll hooks and ONLY if they were all successful pass on all the ‘TestCase` objects down the filter chain
Instance Method Summary collapse
- #done ⇒ Object
-
#initialize(support_code, receiver = nil) ⇒ FireBeforeAllHooks
constructor
A new instance of FireBeforeAllHooks.
- #test_case(test_case) ⇒ Object
Constructor Details
#initialize(support_code, receiver = nil) ⇒ FireBeforeAllHooks
Returns a new instance of FireBeforeAllHooks.
8 9 10 11 12 |
# File 'lib/cucumber/filters/fire_before_all_hooks.rb', line 8 def initialize(support_code, receiver = nil) super @support_code = support_code @test_cases = [] end |
Instance Method Details
#done ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/cucumber/filters/fire_before_all_hooks.rb', line 19 def done if fire_before_all_hook @test_cases.map do |test_case| test_case.describe_to(@receiver) end end receiver.done self end |
#test_case(test_case) ⇒ Object
14 15 16 17 |
# File 'lib/cucumber/filters/fire_before_all_hooks.rb', line 14 def test_case(test_case) @test_cases << test_case self end |