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
32 33 34 35 36 37 |
# File 'lib/cucumber/core/test/runner.rb', line 32 def around_hook(hook, &continue) result = running_test_case.execute(hook, &continue) report.after_test_step running_test_step, result if running_test_step @running_test_step = nil self end |
#done ⇒ Object
39 40 41 42 |
# File 'lib/cucumber/core/test/runner.rb', line 39 def done report.done self end |
#test_case(test_case, &descend) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/cucumber/core/test/runner.rb', line 14 def test_case(test_case, &descend) @running_test_case = RunningTestCase.new @running_test_step = nil 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
23 24 25 26 27 28 29 30 |
# File 'lib/cucumber/core/test/runner.rb', line 23 def test_step(test_step) @running_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 @running_test_step = nil self end |