cucumber-core 8.0.1 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eef88ba25edbd816895b593ccbffba69d4c5e7ecbba140bed44bb0e638b555f
4
- data.tar.gz: acf3b0b3e58df9aac6ff50a9cc0733f7a071cf305e6c0c50e7d1bd51f15867a7
3
+ metadata.gz: f43f47dbb935621c716f72ba221a08f681e455e42a0cef8ee252179ebcf21f39
4
+ data.tar.gz: 6bc6a8eee45a5ca63f79b8b6ab51afd54b225ee6e8e99e4fd52f3cce115ab72c
5
5
  SHA512:
6
- metadata.gz: 6168d7cd8e6455d9b9a0b36e09926406db4c0563096dc933a4aa02c2cd169eef0f7f678c272fa9137e1f471cc2d300038cfa40b85f7d1cc64c8d6b04c5514117
7
- data.tar.gz: 3d31cc0518a4588f9096c80bd219a25574bfad17d5d241eae5c56e06e7c493028880eee39815da5b50a5ab1f73303e101207a31659c1c1e2276ac7e0bd727aed
6
+ metadata.gz: c74bd395c4d266f95f82837c495280a9bb2221630dd0beebd951a6d6f036388936d83942d785fe4a88a5bd1c536571ab3dbe232dc28ae468b7584a1a3bb6e240
7
+ data.tar.gz: a0bbaf6a94c43aa7e770a68ae06e4ff0543b75296f675eca017ba017066622c640ec35daf86008ee1a5cf958f28d157fcf226dd4cbb9187ec51a957da7df5e6f
data/CHANGELOG.md CHANGED
@@ -1,36 +1,64 @@
1
1
  Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) on how to contribute to Cucumber.
2
2
 
3
- ## [In GIT](https://github.com/cucumber/cucumber-ruby-core/compare/v8.0.1...master)
3
+ ## [In GIT](https://github.com/cucumber/cucumber-ruby-core/compare/v10.0.1...main)
4
4
 
5
5
  ### Added
6
6
 
7
7
  ### Changed
8
8
 
9
- ### Deprecated
9
+ ### Deprecate
10
10
 
11
11
  ### Removed
12
12
 
13
13
  ### Fixed
14
14
 
15
- * Make released from docker using secrets from keybase
15
+ ### Dependencies
16
16
 
17
- ## [8.0.1](https://github.com/cucumber/cucumber-ruby-core/compare/v8.0.0...v8.0.1)
17
+
18
+ ## [10.0.1](https://github.com/cucumber/cucumber-ruby-core/compare/v10.0.0...v10.0.1)
19
+
20
+ ### Dependencies
21
+
22
+ * Patched `cucumber-gherkin` and `cucumber-messages`
23
+
24
+ ## [10.0.0](https://github.com/cucumber/cucumber-ruby-core/compare/v9.0.1...v10.0.0)
25
+
26
+ ### Dependencies
27
+
28
+ * Upgraded to gherkin v20 and messages v17.
29
+
30
+ This removes protocol buffers from the runtime dependencies.
31
+
32
+ This deeply impacts the API as the internal representation of messages has changed from
33
+ Protocol Buffer objects to new auto-generated DTOs.
34
+
35
+ ## [9.0.1](https://github.com/cucumber/cucumber-ruby-core/compare/v9.0.0...v9.0.1)
18
36
 
19
37
  ### Fixed
20
38
 
21
- * Make released from docker using secrets from keybase
39
+ * Skipped scenarios do not affect anymore status of flaky scenarios on retry
40
+ ([#218](https://github.com/cucumber/cucumber-ruby-core/pull/218) @eduardrudko)
41
+
42
+ ## [9.0.0](https://github.com/cucumber/cucumber-ruby-core/compare/v8.0.1...v9.0.0)
22
43
 
23
44
  ### Dependencies
24
45
 
46
+ * Upgraded to gherkin v18 and messages v15
47
+ * Updated other dependencies (look at the diff for details)
48
+
49
+ ## [8.0.1](https://github.com/cucumber/cucumber-ruby-core/compare/v8.0.0...v8.0.1)
50
+
51
+ ### Fixed
52
+
53
+ * Make releases from docker using secrets from keybase
54
+
25
55
  ## [8.0.0](https://github.com/cucumber/cucumber-ruby-core/compare/v7.1.0...v8.0.0)
26
56
 
27
57
  This release failed
28
58
 
29
59
  ### Dependencies
30
60
 
31
- * Updated gems: (look at the diff for details)
32
- * `cucumber-gherkin`
33
- * `cucumber-messages`
61
+ * Updated dependencies (look at the diff for details)
34
62
 
35
63
  ## [7.1.0](https://github.com/cucumber/cucumber-ruby-core/compare/v7.0.0...v7.1.0)
36
64
 
data/CONTRIBUTING.md CHANGED
@@ -8,8 +8,6 @@ Release Process
8
8
  * Now release it:
9
9
 
10
10
  ```
11
- bundle update
12
- bundle exec rake
13
11
  git commit -m "Release X.Y.Z"
14
12
  make release
15
13
  ```
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # cucumber-core
2
2
 
3
- [![Chat with us](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/cucumber-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
3
  [![CircleCI](https://circleci.com/gh/cucumber/cucumber-ruby-core.svg?style=svg)](https://circleci.com/gh/cucumber/cucumber-ruby-core)
5
- [![Build Status](https://travis-ci.org/cucumber/cucumber-ruby-core.svg?branch=master)](https://travis-ci.org/cucumber/cucumber-ruby-core)
6
4
  [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby-core.svg)](https://codeclimate.com/github/cucumber/cucumber-ruby-core)
7
5
  [![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby-core/badge.svg?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby-core?branch=master)
6
+ [![pull requests](https://oselvar.com/api/badge?label=pull%20requests&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby-core%2FpullRequests.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby-core)
7
+ [![issues](https://oselvar.com/api/badge?label=issues&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby-core%2Fissues.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby-core)
8
8
 
9
9
  Cucumber Core is the [inner hexagon](http://alistair.cockburn.us/Hexagonal+architecture) for the [Ruby flavour of Cucumber](https://github.com/cucumber/cucumber-ruby).
10
10
 
@@ -40,7 +40,7 @@ module Cucumber
40
40
  lines = source_lines_for_pickle(pickle).sort.reverse
41
41
  tags = pickle.tags.map { |tag| Test::Tag.new(Test::Location.new(uri, source_line_for_pickle_tag(tag)), tag.name) }
42
42
  test_case = Test::Case.new(id_generator.new_id, pickle.name, test_steps, Test::Location.new(uri, lines), tags, pickle.language)
43
- @event_bus.test_case_created(test_case, pickle) unless @event_bus.nil?
43
+ @event_bus&.test_case_created(test_case, pickle)
44
44
  test_case
45
45
  end
46
46
 
@@ -48,11 +48,11 @@ module Cucumber
48
48
  lines = source_lines_for_pickle_step(pickle_step).sort.reverse
49
49
  multiline_arg = create_multiline_arg(pickle_step, uri)
50
50
  step = Test::Step.new(id_generator.new_id, pickle_step.text, Test::Location.new(uri, lines), multiline_arg)
51
- @event_bus.test_step_created(step, pickle_step) unless @event_bus.nil?
51
+ @event_bus&.test_step_created(step, pickle_step)
52
52
  step
53
53
  end
54
54
 
55
- def create_multiline_arg(pickle_step, uri)
55
+ def create_multiline_arg(pickle_step, _uri)
56
56
  if pickle_step.argument
57
57
  if pickle_step.argument.doc_string
58
58
  doc_string = pickle_step.argument.doc_string
@@ -22,7 +22,7 @@ module Cucumber
22
22
  end
23
23
 
24
24
  define_method(:to_h) do
25
- attributes.reduce({}) { |result, attribute|
25
+ attributes.reduce({}) { |result, attribute|
26
26
  value = self.send(attribute)
27
27
  result[attribute] = value
28
28
  result
@@ -48,8 +48,8 @@ module Cucumber
48
48
 
49
49
  def underscore(string)
50
50
  string.to_s.gsub(/::/, '/').
51
- gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
52
- gsub(/([a-z\d])([A-Z])/,'\1_\2').
51
+ gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
52
+ gsub(/([a-z\d])([A-Z])/, '\1_\2').
53
53
  tr("-", "_").
54
54
  downcase
55
55
  end
@@ -44,7 +44,7 @@ module Cucumber
44
44
 
45
45
  def broadcast_queued_events_to(handler, event_type)
46
46
  @event_queue.select { |event|
47
- event.class == event_type
47
+ event.instance_of?(event_type)
48
48
  }.each { |event|
49
49
  handler.call(event)
50
50
  }
@@ -61,7 +61,6 @@ module Cucumber
61
61
 
62
62
  end
63
63
 
64
-
65
64
  # Signals that a {Test::Case} has finished executing
66
65
  class TestCaseFinished < Event.new(:test_case, :result)
67
66
 
@@ -60,12 +60,14 @@ module Cucumber
60
60
  end
61
61
 
62
62
  def statements
63
- prepare_statements language_statement,
63
+ prepare_statements(
64
+ language_statement,
64
65
  comments_statement,
65
66
  tag_statement,
66
67
  name_statement,
67
68
  description_statement,
68
69
  NEW_LINE
70
+ )
69
71
  end
70
72
 
71
73
  def language_statement
@@ -85,10 +87,12 @@ module Cucumber
85
87
 
86
88
  private
87
89
  def statements
88
- prepare_statements comments_statement,
90
+ prepare_statements(
91
+ comments_statement,
89
92
  tag_statement,
90
93
  name_statement,
91
94
  description_statement
95
+ )
92
96
  end
93
97
  end
94
98
 
@@ -104,10 +108,12 @@ module Cucumber
104
108
 
105
109
  private
106
110
  def statements
107
- prepare_statements comments_statement,
111
+ prepare_statements(
112
+ comments_statement,
108
113
  name_statement,
109
114
  description_statement,
110
115
  NEW_LINE
116
+ )
111
117
  end
112
118
  end
113
119
 
@@ -123,10 +129,12 @@ module Cucumber
123
129
 
124
130
  private
125
131
  def statements
126
- prepare_statements comments_statement,
132
+ prepare_statements(
133
+ comments_statement,
127
134
  tag_statement,
128
135
  name_statement,
129
136
  description_statement
137
+ )
130
138
  end
131
139
  end
132
140
 
@@ -235,12 +243,14 @@ module Cucumber
235
243
 
236
244
  private
237
245
  def statements
238
- prepare_statements NEW_LINE,
246
+ prepare_statements(
247
+ NEW_LINE,
239
248
  comments_statement,
240
249
  tag_statement,
241
250
  name_statement,
242
251
  description_statement,
243
252
  row_statements(2)
253
+ )
244
254
  end
245
255
  end
246
256
  end
@@ -126,11 +126,11 @@ module Cucumber
126
126
  module HasDescription
127
127
  private
128
128
  def description
129
- options.fetch(:description) { '' }.split("\n").map(&:strip)
129
+ options.fetch(:description, '').split("\n").map(&:strip)
130
130
  end
131
131
 
132
132
  def description_statement
133
- description.map { |s| indent(s,2) } unless description.empty?
133
+ description.map { |s| indent(s, 2) } unless description.empty?
134
134
  end
135
135
  end
136
136
 
@@ -23,7 +23,7 @@ module Cucumber
23
23
  if event.test_case != @previous_test_case
24
24
  @previous_test_case = event.test_case
25
25
  event.result.describe_to test_cases
26
- elsif event.result.passed?
26
+ elsif event.result.passed? || event.result.skipped?
27
27
  test_cases.flaky
28
28
  test_cases.decrement_failed
29
29
  end
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
+ require 'cucumber/core/test/location'
2
3
  require 'cucumber/core/test/result'
3
4
  require 'cucumber/core/test/timer'
4
- require 'cucumber/core/test/result'
5
- require 'cucumber/core/test/location'
6
5
 
7
6
  module Cucumber
8
7
  module Core
@@ -104,7 +104,7 @@ module Cucumber
104
104
 
105
105
  def hashes_to_array(hashes)
106
106
  header = hashes[0].keys.sort
107
- [header] + hashes.map{|hash| header.map{|key| hash[key]}}
107
+ [header] + hashes.map {|hash| header.map {|key| hash[key]}}
108
108
  end
109
109
 
110
110
  end
@@ -33,4 +33,3 @@ module Cucumber
33
33
  end
34
34
  end
35
35
  end
36
-
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
+ require "cucumber/messages"
4
+ require "cucumber/messages/time_conversion"
3
5
 
4
6
  module Cucumber
5
7
  module Core
@@ -44,8 +46,8 @@ module Cucumber
44
46
  end
45
47
 
46
48
  def to_message
47
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
48
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::UNKNOWN,
49
+ Cucumber::Messages::TestStepResult.new(
50
+ status: Cucumber::Messages::TestStepResultStatus::UNKNOWN,
49
51
  duration: UnknownDuration.new.to_message_duration
50
52
  )
51
53
  end
@@ -75,8 +77,8 @@ module Cucumber
75
77
  end
76
78
 
77
79
  def to_message
78
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
79
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::PASSED,
80
+ Cucumber::Messages::TestStepResult.new(
81
+ status: Cucumber::Messages::TestStepResultStatus::PASSED,
80
82
  duration: duration.to_message_duration
81
83
  )
82
84
  end
@@ -128,8 +130,8 @@ module Cucumber
128
130
  message = ""
129
131
  end
130
132
 
131
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
132
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::FAILED,
133
+ Cucumber::Messages::TestStepResult.new(
134
+ status: Cucumber::Messages::TestStepResultStatus::FAILED,
133
135
  duration: duration.to_message_duration,
134
136
  message: message
135
137
  )
@@ -216,8 +218,8 @@ module Cucumber
216
218
  end
217
219
 
218
220
  def to_message
219
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
220
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::UNDEFINED,
221
+ Cucumber::Messages::TestStepResult.new(
222
+ status: Cucumber::Messages::TestStepResultStatus::UNDEFINED,
221
223
  duration: duration.to_message_duration
222
224
  )
223
225
  end
@@ -241,8 +243,8 @@ module Cucumber
241
243
  end
242
244
 
243
245
  def to_message
244
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
245
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::SKIPPED,
246
+ Cucumber::Messages::TestStepResult.new(
247
+ status: Cucumber::Messages::TestStepResultStatus::SKIPPED,
246
248
  duration: duration.to_message_duration
247
249
  )
248
250
  end
@@ -266,8 +268,8 @@ module Cucumber
266
268
  end
267
269
 
268
270
  def to_message
269
- Cucumber::Messages::TestStepFinished::TestStepResult.new(
270
- status: Cucumber::Messages::TestStepFinished::TestStepResult::Status::PENDING,
271
+ Cucumber::Messages::TestStepResult.new(
272
+ status: Cucumber::Messages::TestStepResultStatus::PENDING,
271
273
  duration: duration.to_message_duration
272
274
  )
273
275
  end
@@ -280,7 +282,7 @@ module Cucumber
280
282
  private :settings
281
283
 
282
284
  def initialize(strict_types = [])
283
- @settings = Hash[STRICT_AFFECTED_TYPES.map { |t| [t, :default] }]
285
+ @settings = STRICT_AFFECTED_TYPES.map { |t| [t, :default] }.to_h
284
286
  strict_types.each do |type|
285
287
  set_strict(true, type)
286
288
  end
@@ -310,7 +312,7 @@ module Cucumber
310
312
  end
311
313
 
312
314
  def merge!(other)
313
- settings.keys.each do |type|
315
+ settings.each_key do |type|
314
316
  set_strict(other.strict?(type), type) if other.set?(type)
315
317
  end
316
318
  self
@@ -369,7 +371,7 @@ module Cucumber
369
371
 
370
372
  def total(for_status = nil)
371
373
  if for_status
372
- @totals.fetch(for_status) { 0 }
374
+ @totals.fetch(for_status, 0)
373
375
  else
374
376
  @totals.reduce(0) { |total, status| total += status[1] }
375
377
  end
@@ -383,7 +385,7 @@ module Cucumber
383
385
 
384
386
  def get_total(method_name)
385
387
  status = method_name.to_s.gsub('total_', '').to_sym
386
- return @totals.fetch(status) { 0 }
388
+ return @totals.fetch(status, 0)
387
389
  end
388
390
 
389
391
  def increment_total(status)
@@ -402,7 +404,14 @@ module Cucumber
402
404
  end
403
405
 
404
406
  def to_message_duration
405
- seconds_to_duration(nanoseconds.to_f / NANOSECONDS_PER_SECOND)
407
+ duration_hash = seconds_to_duration(nanoseconds.to_f / NANOSECONDS_PER_SECOND)
408
+ duration_hash.transform_keys! do |key|
409
+ key.to_sym
410
+ rescue Error
411
+ return key
412
+ end
413
+
414
+ Cucumber::Messages::Duration.from_h(duration_hash)
406
415
  end
407
416
  end
408
417
 
@@ -418,7 +427,7 @@ module Cucumber
418
427
  end
419
428
 
420
429
  def to_message_duration
421
- seconds_to_duration(0)
430
+ Cucumber::Messages::Duration.new(seconds: 0, nanos: 0)
422
431
  end
423
432
  end
424
433
  end
@@ -19,7 +19,7 @@ module Cucumber
19
19
  end
20
20
 
21
21
  def sec
22
- nsec / 10 ** 9.0
22
+ nsec / 10**9.0
23
23
  end
24
24
 
25
25
  private
@@ -42,7 +42,7 @@ module Cucumber
42
42
  else
43
43
  def time_in_nanoseconds
44
44
  t = Time.now
45
- t.to_i * 10 ** 9 + t.nsec
45
+ t.to_i * 10**9 + t.nsec
46
46
  end
47
47
  end
48
48
  end
@@ -3,7 +3,7 @@ module Cucumber
3
3
  module Core
4
4
  class Version
5
5
  def self.to_s
6
- "8.0.1"
6
+ "10.0.1"
7
7
  end
8
8
  end
9
9
  end
data/spec/coverage.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  require 'rubygems'
3
- require 'bundler/setup'
4
3
  require 'simplecov'
5
4
  formatters = [ SimpleCov::Formatter::HTMLFormatter ]
6
5
 
@@ -52,7 +52,7 @@ module Cucumber::Core
52
52
  end
53
53
  ]
54
54
 
55
- compile(gherkin_documents, event_bus) do | visitor |
55
+ compile(gherkin_documents, event_bus) do |visitor|
56
56
  allow( visitor ).to receive(:test_case)
57
57
  allow( visitor ).to receive(:test_step)
58
58
  allow( visitor ).to receive(:done)
@@ -74,7 +74,7 @@ module Cucumber
74
74
 
75
75
  context "#broadcast method" do
76
76
  it "must be passed an instance of a registered event type" do
77
- expect {
77
+ expect {
78
78
  event_bus.broadcast Events::UnregisteredEvent
79
79
  }.to raise_error(ArgumentError)
80
80
  end
@@ -95,7 +95,7 @@ module Cucumber
95
95
  end
96
96
 
97
97
  it "raises an error if you use an unknown Event ID" do
98
- expect {
98
+ expect {
99
99
  event_bus.on(:some_unknown_event) { :whatever }
100
100
  }.to raise_error(ArgumentError)
101
101
  end
@@ -13,7 +13,7 @@ module Cucumber
13
13
 
14
14
  it "generates events with attributes" do
15
15
  my_event_type = Event.new(:foo, :bar)
16
- my_event = my_event_type.new(1,2)
16
+ my_event = my_event_type.new(1, 2)
17
17
  expect(my_event.attributes).to eq [1, 2]
18
18
  expect(my_event.foo).to eq 1
19
19
  expect(my_event.bar).to eq 2
@@ -25,13 +25,13 @@ module Cucumber
25
25
  end
26
26
 
27
27
  it "can be converted to a hash" do
28
- my_event = MyEventType.new(1,2)
28
+ my_event = MyEventType.new(1, 2)
29
29
  expect(my_event.to_h).to eq foo: 1, bar: 2
30
30
  end
31
31
 
32
32
  it "has an event_id" do
33
33
  expect(MyEventType.event_id).to eq :my_event_type
34
- expect(MyEventType.new(1,2).event_id).to eq :my_event_type
34
+ expect(MyEventType.new(1, 2).event_id).to eq :my_event_type
35
35
  end
36
36
  end
37
37
  end
@@ -11,7 +11,7 @@ module Cucumber::Core
11
11
  describe ".new" do
12
12
  let(:receiver) { double.as_null_object }
13
13
 
14
- let(:doc) {
14
+ let(:doc) {
15
15
  gherkin do
16
16
  feature do
17
17
  scenario 'x' do
@@ -46,7 +46,7 @@ module Cucumber::Core
46
46
  end
47
47
  end
48
48
 
49
- # You can pass the names of attributes when building a
49
+ # You can pass the names of attributes when building a
50
50
  # filter, allowing you to have custom attributes.
51
51
  class NamedBlankingFilter < Filter.new(:name_pattern)
52
52
  def test_case(test_case)
@@ -143,7 +143,7 @@ module Cucumber
143
143
  step 'text'
144
144
  end
145
145
  end
146
- rule description: "Second rule"do
146
+ rule description: "Second rule" do
147
147
  example name: "Do not talk about the fight club" do
148
148
  step 'text'
149
149
  end
@@ -330,4 +330,3 @@ module Cucumber::Core::Gherkin
330
330
  end
331
331
  end
332
332
  end
333
-
@@ -65,6 +65,17 @@ module Cucumber::Core::Report
65
65
  expect( @summary.test_cases.total(:flaky) ).to eq(1)
66
66
  expect( @summary.test_cases.total ).to eq(1)
67
67
  end
68
+
69
+ it "handless flaky with following skip test cases" do
70
+ allow(test_case).to receive(:==).and_return(false, true)
71
+ event_bus.send(:test_case_finished, test_case, failed_result)
72
+ event_bus.send(:test_case_finished, test_case, skipped_result)
73
+
74
+ expect( @summary.test_cases.total(:failed) ).to eq(0)
75
+ expect( @summary.test_cases.total(:skipped) ).to eq(0)
76
+ expect( @summary.test_cases.total(:flaky) ).to eq(1)
77
+ expect( @summary.test_cases.total ).to eq(1)
78
+ end
68
79
  end
69
80
 
70
81
  context "test step summary" do
@@ -17,7 +17,7 @@ module Cucumber
17
17
  context "location" do
18
18
 
19
19
  context "with location passed to the constructor" do
20
- let(:location) { double }
20
+ let(:location) { double }
21
21
 
22
22
  it "returns the location passed to the constructor" do
23
23
  action = Action.new(location) {}
@@ -151,4 +151,3 @@ module Cucumber
151
151
  end
152
152
  end
153
153
  end
154
-
@@ -15,20 +15,20 @@ module Cucumber
15
15
 
16
16
  describe "equality" do
17
17
  it "is equal to another table with the same data" do
18
- expect( DataTable.new([[1,2],[3,4]]) ).to eq DataTable.new([[1,2],[3,4]])
18
+ expect( DataTable.new([[1, 2], [3, 4]]) ).to eq DataTable.new([[1, 2], [3, 4]])
19
19
  end
20
20
 
21
21
  it "is not equal to another table with different data" do
22
- expect( DataTable.new([[1,2],[3,4]]) ).not_to eq DataTable.new([[1,2]])
22
+ expect( DataTable.new([[1, 2], [3, 4]]) ).not_to eq DataTable.new([[1, 2]])
23
23
  end
24
24
 
25
25
  it "is not equal to a non table" do
26
- expect( DataTable.new([[1,2],[3,4]]) ).not_to eq Object.new
26
+ expect( DataTable.new([[1, 2], [3, 4]]) ).not_to eq Object.new
27
27
  end
28
28
  end
29
29
 
30
30
  describe "#data_table?" do
31
- let(:table) { DataTable.new([[1,2],[3,4]]) }
31
+ let(:table) { DataTable.new([[1, 2], [3, 4]]) }
32
32
 
33
33
  it "returns true" do
34
34
  expect(table).to be_data_table
@@ -36,7 +36,7 @@ module Cucumber
36
36
  end
37
37
 
38
38
  describe "#doc_string" do
39
- let(:table) { DataTable.new([[1,2],[3,4]]) }
39
+ let(:table) { DataTable.new([[1, 2], [3, 4]]) }
40
40
 
41
41
  it "returns false" do
42
42
  expect(table).not_to be_doc_string
@@ -52,7 +52,7 @@ module Cucumber
52
52
  end
53
53
 
54
54
  it 'returns a new table with the cells modified by the block' do
55
- expect( table.map { |cell| "*#{cell}*" } ).to eq DataTable.new([%w{*foo* *bar*}, %w{*1* *2*}])
55
+ expect( table.map { |cell| "*#{cell}*" } ).to eq DataTable.new([%w{*foo* *bar*}, %w{*1* *2*}])
56
56
  end
57
57
  end
58
58
 
@@ -19,9 +19,9 @@ module Cucumber::Core::Test
19
19
  expect( one_location ).to eq another_location
20
20
  end
21
21
 
22
- it "is not equal to a wild card of the same file" do
23
- expect( Location.new(file, line) ).not_to eq Location.new(file)
24
- end
22
+ it "is not equal to a wild card of the same file" do
23
+ expect( Location.new(file, line) ).not_to eq Location.new(file)
24
+ end
25
25
 
26
26
  context "collections of locations" do
27
27
  it "behave as expected with uniq" do
@@ -45,7 +45,7 @@ module Cucumber::Core::Test
45
45
  end
46
46
 
47
47
  it "is file:line:line:line for an arbitrary set of lines" do
48
- expect( Location.new("foo.feature", [1,3,5]).to_s ).to eq "foo.feature:1:3:5"
48
+ expect( Location.new("foo.feature", [1, 3, 5]).to_s ).to eq "foo.feature:1:3:5"
49
49
  end
50
50
  end
51
51
 
@@ -88,7 +88,7 @@ module Cucumber::Core::Test
88
88
  describe "created from source location" do
89
89
  context "when the location is in the tree below pwd" do
90
90
  it "create a relative path from pwd" do
91
- expect( Location.from_source_location(Dir.pwd + "/path/file.rb", 1).file ).to eq "path/file.rb"
91
+ expect( Location.from_source_location("#{Dir.pwd}/path/file.rb", 1).file ).to eq "path/file.rb"
92
92
  end
93
93
  end
94
94
 
@@ -109,7 +109,7 @@ module Cucumber::Core::Test
109
109
 
110
110
  describe "created from file-colon-line" do
111
111
  it "handles also Windows paths" do
112
- # Note: running this test on Windows will produce "c:/path/file.rb", but "c:\path\file.rb" on Linux.
112
+ # NOTE: running this test on Windows will produce "c:/path/file.rb", but "c:\path\file.rb" on Linux.
113
113
  expect( Location.from_file_colon_line("c:\\path\\file.rb:123").file ).to match(/c:(\\|\/)path(\\|\/)file.rb/)
114
114
  end
115
115
  end
@@ -119,7 +119,7 @@ module Cucumber::Core::Test
119
119
  expect( Location.of_caller.to_s ).to be_included_in caller[0]
120
120
  end
121
121
 
122
- context "when specifying additional caller depth"do
122
+ context "when specifying additional caller depth" do
123
123
  it "use the location of the n:th caller" do
124
124
  expect( Location.of_caller(1).to_s ).to be_included_in caller[1]
125
125
  end
@@ -25,7 +25,7 @@ module Cucumber::Core::Test
25
25
 
26
26
  it "converts to a Cucumber::Message::TestResult" do
27
27
  message = result.to_message
28
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::PASSED)
28
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::PASSED)
29
29
  end
30
30
 
31
31
  it "has a duration" do
@@ -75,7 +75,7 @@ module Cucumber::Core::Test
75
75
 
76
76
  it "converts to a Cucumber::Message::TestResult" do
77
77
  message = result.to_message
78
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::FAILED)
78
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::FAILED)
79
79
  end
80
80
 
81
81
  it "requires both constructor arguments" do
@@ -144,7 +144,7 @@ module Cucumber::Core::Test
144
144
 
145
145
  it "converts to a Cucumber::Message::TestResult" do
146
146
  message = result.to_message
147
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::UNKNOWN)
147
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::UNKNOWN)
148
148
  end
149
149
  end
150
150
 
@@ -207,7 +207,7 @@ module Cucumber::Core::Test
207
207
 
208
208
  it "converts to a Cucumber::Message::TestResult" do
209
209
  message = result.to_message
210
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::UNDEFINED)
210
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::UNDEFINED)
211
211
  end
212
212
 
213
213
  specify { expect( result.to_sym ).to eq :undefined }
@@ -236,7 +236,7 @@ module Cucumber::Core::Test
236
236
 
237
237
  it "converts to a Cucumber::Message::TestResult" do
238
238
  message = result.to_message
239
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::SKIPPED)
239
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::SKIPPED)
240
240
  end
241
241
 
242
242
  specify { expect( result.to_sym ).to eq :skipped }
@@ -263,7 +263,7 @@ module Cucumber::Core::Test
263
263
 
264
264
  it "converts to a Cucumber::Message::TestResult" do
265
265
  message = result.to_message
266
- expect(message.status).to eq(Cucumber::Messages::TestStepFinished::TestStepResult::Status::PENDING)
266
+ expect(message.status).to eq(Cucumber::Messages::TestStepResultStatus::PENDING)
267
267
  end
268
268
 
269
269
  specify { expect( result.to_sym ).to eq :pending }
@@ -344,16 +344,16 @@ module Cucumber::Core::Test
344
344
  describe '#merge!' do
345
345
  let(:merged_configuration) { Result::StrictConfiguration.new }
346
346
  it 'sets the not default values from the argument accordingly' do
347
- strict_configuration.set_strict(false, :undefined)
348
- strict_configuration.set_strict(false, :pending)
349
- strict_configuration.set_strict(true, :flaky)
350
- merged_configuration.set_strict(true, :pending)
351
- merged_configuration.set_strict(false, :flaky)
352
- strict_configuration.merge!(merged_configuration)
353
-
354
- expect( strict_configuration.strict?(:undefined) ).to be_falsey
355
- expect( strict_configuration.strict?(:pending) ).to be_truthy
356
- expect( strict_configuration.strict?(:flaky) ).to be_falsey
347
+ strict_configuration.set_strict(false, :undefined)
348
+ strict_configuration.set_strict(false, :pending)
349
+ strict_configuration.set_strict(true, :flaky)
350
+ merged_configuration.set_strict(true, :pending)
351
+ merged_configuration.set_strict(false, :flaky)
352
+ strict_configuration.merge!(merged_configuration)
353
+
354
+ expect( strict_configuration.strict?(:undefined) ).to be_falsey
355
+ expect( strict_configuration.strict?(:pending) ).to be_truthy
356
+ expect( strict_configuration.strict?(:flaky) ).to be_falsey
357
357
  end
358
358
  end
359
359
  end
@@ -62,7 +62,7 @@ module Cucumber
62
62
  scenario_outline 'foo' do
63
63
  step '<arg>'
64
64
 
65
- examples tags: '@a'do
65
+ examples tags: '@a' do
66
66
  row 'arg'
67
67
  row 'x'
68
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.1
4
+ version: 10.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-08-19 00:00:00.000000000 Z
15
+ date: 2021-07-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: cucumber-gherkin
@@ -20,60 +20,60 @@ dependencies:
20
20
  requirements:
21
21
  - - "~>"
22
22
  - !ruby/object:Gem::Version
23
- version: '15.0'
23
+ version: '20.0'
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 15.0.2
26
+ version: 20.0.1
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '15.0'
33
+ version: '20.0'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 15.0.2
36
+ version: 20.0.1
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: cucumber-messages
39
39
  requirement: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '13.0'
43
+ version: '17.0'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 13.0.1
46
+ version: 17.0.1
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '13.0'
53
+ version: '17.0'
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 13.0.1
56
+ version: 17.0.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: cucumber-tag-expressions
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '2.0'
63
+ version: '3.0'
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 2.0.4
66
+ version: 3.0.1
67
67
  type: :runtime
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '2.0'
73
+ version: '3.0'
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 2.0.4
76
+ version: 3.0.1
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: coveralls
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -103,7 +103,7 @@ dependencies:
103
103
  version: '13.0'
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- version: 13.0.1
106
+ version: 13.0.6
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,47 +113,67 @@ dependencies:
113
113
  version: '13.0'
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 13.0.1
116
+ version: 13.0.6
117
+ - !ruby/object:Gem::Dependency
118
+ name: rspec
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '3.10'
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 3.10.0
127
+ type: :development
128
+ prerelease: false
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '3.10'
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 3.10.0
117
137
  - !ruby/object:Gem::Dependency
118
138
  name: rubocop
119
139
  requirement: !ruby/object:Gem::Requirement
120
140
  requirements:
121
141
  - - "~>"
122
142
  - !ruby/object:Gem::Version
123
- version: '0.89'
143
+ version: '1.18'
124
144
  - - ">="
125
145
  - !ruby/object:Gem::Version
126
- version: 0.89.1
146
+ version: 1.18.3
127
147
  type: :development
128
148
  prerelease: false
129
149
  version_requirements: !ruby/object:Gem::Requirement
130
150
  requirements:
131
151
  - - "~>"
132
152
  - !ruby/object:Gem::Version
133
- version: '0.89'
153
+ version: '1.18'
134
154
  - - ">="
135
155
  - !ruby/object:Gem::Version
136
- version: 0.89.1
156
+ version: 1.18.3
137
157
  - !ruby/object:Gem::Dependency
138
- name: rspec
158
+ name: rubocop-packaging
139
159
  requirement: !ruby/object:Gem::Requirement
140
160
  requirements:
141
161
  - - "~>"
142
162
  - !ruby/object:Gem::Version
143
- version: '3.9'
163
+ version: '0.5'
144
164
  - - ">="
145
165
  - !ruby/object:Gem::Version
146
- version: 3.9.0
166
+ version: 0.5.1
147
167
  type: :development
148
168
  prerelease: false
149
169
  version_requirements: !ruby/object:Gem::Requirement
150
170
  requirements:
151
171
  - - "~>"
152
172
  - !ruby/object:Gem::Version
153
- version: '3.9'
173
+ version: '0.5'
154
174
  - - ">="
155
175
  - !ruby/object:Gem::Version
156
- version: 3.9.0
176
+ version: 0.5.1
157
177
  - !ruby/object:Gem::Dependency
158
178
  name: unindent
159
179
  requirement: !ruby/object:Gem::Requirement
@@ -264,27 +284,27 @@ requirements: []
264
284
  rubygems_version: 3.1.2
265
285
  signing_key:
266
286
  specification_version: 4
267
- summary: cucumber-core-8.0.1
287
+ summary: cucumber-core-10.0.1
268
288
  test_files:
269
- - spec/cucumber/core/test/runner_spec.rb
270
- - spec/cucumber/core/test/doc_string_spec.rb
271
- - spec/cucumber/core/test/filters/locations_filter_spec.rb
272
- - spec/cucumber/core/test/step_spec.rb
273
- - spec/cucumber/core/test/duration_matcher.rb
289
+ - spec/cucumber/core_spec.rb
290
+ - spec/cucumber/core/report/summary_spec.rb
291
+ - spec/cucumber/core/compiler_spec.rb
292
+ - spec/cucumber/core/gherkin/parser_spec.rb
293
+ - spec/cucumber/core/gherkin/writer_spec.rb
294
+ - spec/cucumber/core/event_bus_spec.rb
295
+ - spec/cucumber/core/filter_spec.rb
296
+ - spec/cucumber/core/test/timer_spec.rb
274
297
  - spec/cucumber/core/test/case_spec.rb
275
298
  - spec/cucumber/core/test/result_spec.rb
276
- - spec/cucumber/core/test/location_spec.rb
277
299
  - spec/cucumber/core/test/action_spec.rb
278
- - spec/cucumber/core/test/timer_spec.rb
300
+ - spec/cucumber/core/test/filters/locations_filter_spec.rb
301
+ - spec/cucumber/core/test/runner_spec.rb
302
+ - spec/cucumber/core/test/doc_string_spec.rb
303
+ - spec/cucumber/core/test/location_spec.rb
304
+ - spec/cucumber/core/test/duration_matcher.rb
279
305
  - spec/cucumber/core/test/data_table_spec.rb
306
+ - spec/cucumber/core/test/step_spec.rb
280
307
  - spec/cucumber/core/test/empty_multiline_argument_spec.rb
281
- - spec/cucumber/core/gherkin/parser_spec.rb
282
- - spec/cucumber/core/gherkin/writer_spec.rb
283
308
  - spec/cucumber/core/event_spec.rb
284
- - spec/cucumber/core/report/summary_spec.rb
285
- - spec/cucumber/core/compiler_spec.rb
286
- - spec/cucumber/core/event_bus_spec.rb
287
- - spec/cucumber/core/filter_spec.rb
288
- - spec/cucumber/core_spec.rb
289
- - spec/coverage.rb
290
309
  - spec/report_api_spy.rb
310
+ - spec/coverage.rb