Class: Cucumber::Core::Test::Runner
- Inherits:
-
Object
- Object
- Cucumber::Core::Test::Runner
- Defined in:
- lib/cucumber/core/test/runner.rb
Defined Under Namespace
Classes: RunningTestCase
Instance Method Summary collapse
- #around_hook(hook, &continue) ⇒ Object
- #done ⇒ Object
-
#initialize(report) ⇒ Runner
constructor
A new instance of Runner.
- #test_case(test_case, &descend) ⇒ Object
- #test_step(test_step) ⇒ Object
Constructor Details
#initialize(report) ⇒ Runner
Returns a new instance of Runner.
10 11 12 |
# File 'lib/cucumber/core/test/runner.rb', line 10 def initialize(report) @report = report end |
Instance Method Details
#around_hook(hook, &continue) ⇒ Object
29 30 31 32 |
# File 'lib/cucumber/core/test/runner.rb', line 29 def around_hook(hook, &continue) running_test_case.execute(hook, &continue) self end |
#done ⇒ Object
34 35 36 37 |
# File 'lib/cucumber/core/test/runner.rb', line 34 def done report.done self end |
#test_case(test_case, &descend) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/cucumber/core/test/runner.rb', line 14 def test_case(test_case, &descend) @running_test_case = RunningTestCase.new report.before_test_case(test_case) descend.call(self) report.after_test_case(test_case, running_test_case.result) self end |
#test_step(test_step) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/cucumber/core/test/runner.rb', line 22 def test_step(test_step) report.before_test_step test_step step_result = running_test_case.execute(test_step) report.after_test_step test_step, step_result self end |