Class: Cucumber::Core::Test::Runner
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb
Defined Under Namespace
Classes: RunningTestCase
Instance Method Summary collapse
- #around_hook(hook, &continue) ⇒ Object
- #done ⇒ Object
-
#initialize(event_bus) ⇒ Runner
constructor
A new instance of Runner.
- #test_case(test_case, &descend) ⇒ Object
- #test_step(test_step) ⇒ Object
Constructor Details
#initialize(event_bus) ⇒ Runner
Returns a new instance of Runner.
11 12 13 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb', line 11 def initialize(event_bus) @event_bus = event_bus end |
Instance Method Details
#around_hook(hook, &continue) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb', line 35 def around_hook(hook, &continue) result = running_test_case.execute(hook, &continue) event_bus.test_step_finished running_test_step, result if running_test_step @running_test_step = nil self end |
#done ⇒ Object
42 43 44 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb', line 42 def done self end |
#test_case(test_case, &descend) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb', line 15 def test_case(test_case, &descend) @running_test_case = RunningTestCase.new @running_test_step = nil event_bus.test_case_started(test_case) descend.call(self) result = running_test_case.result result = Result::Undefined.new('The test case has no steps', Result::UnknownDuration.new, ["#{test_case.location}:in `#{test_case.name}'"]) if result.unknown? event_bus.test_case_finished(test_case, result) self end |
#test_step(test_step) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/runner.rb', line 26 def test_step(test_step) @running_test_step = test_step event_bus.test_step_started test_step step_result = running_test_case.execute(test_step) event_bus.test_step_finished test_step, step_result @running_test_step = nil self end |