Class: Cucumber::Formatter::Query::PickleByTest
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/query/pickle_by_test.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ PickleByTest
constructor
A new instance of PickleByTest.
- #pickle_id(test_case) ⇒ Object
Constructor Details
#initialize(config) ⇒ PickleByTest
Returns a new instance of PickleByTest.
7 8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/query/pickle_by_test.rb', line 7 def initialize(config) @pickle_id_by_test_case_id = {} config.on_event :test_case_created, &method(:on_test_case_created) end |
Instance Method Details
#pickle_id(test_case) ⇒ Object
12 13 14 15 16 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/query/pickle_by_test.rb', line 12 def pickle_id(test_case) return @pickle_id_by_test_case_id[test_case.id] if @pickle_id_by_test_case_id.key?(test_case.id) raise TestCaseUnknownError, "No pickle found for #{test_case.id} }. Known: #{@pickle_id_by_test_case_id.keys}" end |