Class: Cucumber::Runtime::BeforeHooks
- Defined in:
- lib/cucumber/runtime/before_hooks.rb
Instance Method Summary collapse
- #apply_to(test_case) ⇒ Object
-
#initialize(action_blocks) ⇒ BeforeHooks
constructor
A new instance of BeforeHooks.
Constructor Details
#initialize(action_blocks) ⇒ BeforeHooks
Returns a new instance of BeforeHooks.
4 5 6 |
# File 'lib/cucumber/runtime/before_hooks.rb', line 4 def initialize(action_blocks) @action_blocks = action_blocks end |
Instance Method Details
#apply_to(test_case) ⇒ Object
8 9 10 11 12 |
# File 'lib/cucumber/runtime/before_hooks.rb', line 8 def apply_to(test_case) test_case.with_steps( before_hooks(test_case.source) + test_case.test_steps ) end |