From 395fcc398f2a4685987880c1ba01c06bae187656 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 16:50:33 +0000 Subject: [PATCH 1/8] Add initial TDD view for the reverse ordering NB: The assertion will need remedying --- .../{randomize.feature => ordering.feature} | 99 +++++++++++++++++-- 1 file changed, 91 insertions(+), 8 deletions(-) rename features/docs/cli/{randomize.feature => ordering.feature} (56%) diff --git a/features/docs/cli/randomize.feature b/features/docs/cli/ordering.feature similarity index 56% rename from features/docs/cli/randomize.feature rename to features/docs/cli/ordering.feature index f810a774e6..4506eca24b 100644 --- a/features/docs/cli/randomize.feature +++ b/features/docs/cli/ordering.feature @@ -1,8 +1,11 @@ -Feature: Randomize +Feature: Ordering - Use the `--order random` switch to run scenarios in random order. + Cucumber can run scenarios in different orders. By default, scenarios are run in the order they + appear in the feature files. Use the `--order random` switch to run scenarios in random order. - This is especially helpful for detecting situations where you have state + You can also run cucumber in a reverse order using `--order reverse`. + + Using different ordering can help you detect situations where you have state leaking between scenarios, which can cause flickering or fragile tests. If you do find a random run that exposes dependencies between your tests, @@ -41,15 +44,15 @@ Feature: Randomize """ And a file named "features/step_definitions/steps.rb" with: """ - Given(/^I set some state$/) do - $global_state = "set" + Given('I set some state') do + $global_state = 'set' end - Given(/^I depend on the state$/) do - raise "I expect the state to be set!" unless $global_state == "set" + Given('I depend on the state') do + raise 'I expect the state to be set!' unless $global_state == 'set' end - Given(/^I do something$/) do + Given('I do something') do end """ @@ -142,3 +145,83 @@ Feature: Randomize Randomized with seed 41544 """ + + @global_state + Scenario: Run scenarios in reverse order + When I run `cucumber --order reverse -q` + Then it should fail + And the stdout should contain exactly: + """ + Feature: Bad practice, part 1 + + Scenario: Set state + Given I set some state + + Feature: Unrelated + + @skipme + Scenario: Do something unrelated + When I do something + + Feature: Bad practice, part 2 + + Scenario: Depend on state from a preceding feature + When I depend on the state + I expect the state to be set! (RuntimeError) + ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + features/bad_practice_part_2.feature:4:in `I depend on the state' + + Feature: Bad practice, part 1 + + Scenario: Depend on state from a preceding scenario + When I depend on the state + I expect the state to be set! (RuntimeError) + ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + features/bad_practice_part_1.feature:7:in `I depend on the state' + + Failing Scenarios: + cucumber features/bad_practice_part_2.feature:3 + cucumber features/bad_practice_part_1.feature:6 + + 4 scenarios (2 failed, 2 passed) + 4 steps (2 failed, 2 passed) + + Randomized with seed 41544 + """ + + @global_state + Scenario: Run scenarios in reverse order with some skipped + When I run `cucumber --tags "not @skipme" --order reverse -q` + Then it should fail with exactly: + """ + Feature: Bad practice, part 1 + + Scenario: Depend on state from a preceding scenario + When I depend on the state + I expect the state to be set! (RuntimeError) + ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + features/bad_practice_part_1.feature:7:in `I depend on the state' + + Feature: Bad practice, part 2 + + Scenario: Depend on state from a preceding feature + When I depend on the state + I expect the state to be set! (RuntimeError) + ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + features/bad_practice_part_2.feature:4:in `I depend on the state' + + Feature: Bad practice, part 1 + + Scenario: Set state + Given I set some state + + Failing Scenarios: + cucumber features/bad_practice_part_1.feature:6 + cucumber features/bad_practice_part_2.feature:3 + + 3 scenarios (2 failed, 1 passed) + 3 steps (2 failed, 1 passed) + + Randomized with seed 41544 + + """ From 62e3774da528751455f19461b1789a2fde440c08 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 16:59:40 +0000 Subject: [PATCH 2/8] Fix up positive scenario to have full timestamp sanitized --- features/docs/cli/ordering.feature | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/features/docs/cli/ordering.feature b/features/docs/cli/ordering.feature index 4506eca24b..d2366413f8 100644 --- a/features/docs/cli/ordering.feature +++ b/features/docs/cli/ordering.feature @@ -59,6 +59,31 @@ Feature: Ordering Scenario: Run scenarios in order When I run `cucumber` Then it should pass + And the stdout should contain exactly: + """ + Feature: Bad practice, part 1 + + Scenario: Set state # features/bad_practice_part_1.feature:3 + Given I set some state # features/step_definitions/steps.rb:1 + + Scenario: Depend on state from a preceding scenario # features/bad_practice_part_1.feature:6 + When I depend on the state # features/step_definitions/steps.rb:5 + + Feature: Bad practice, part 2 + + Scenario: Depend on state from a preceding feature # features/bad_practice_part_2.feature:3 + When I depend on the state # features/step_definitions/steps.rb:5 + + Feature: Unrelated + + @skipme + Scenario: Do something unrelated # features/unrelated.feature:4 + When I do something # features/step_definitions/steps.rb:9 + + 4 scenarios (4 passed) + 4 steps (4 passed) + 0m0.012s + """ @global_state Scenario: Run scenarios randomized From 12a73df46a893db9fc4ffe8cc029c35c987e149b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 17:14:04 +0000 Subject: [PATCH 3/8] Add in logic for new reversal filter --- lib/cucumber/cli/options.rb | 3 ++- lib/cucumber/configuration.rb | 4 +++ lib/cucumber/filters/randomizer.rb | 10 ++++---- lib/cucumber/filters/reverser.rb | 41 ++++++++++++++++++++++++++++++ lib/cucumber/runtime.rb | 1 + 5 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 lib/cucumber/filters/reverser.rb diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb index 3e9104567b..3859f5a277 100644 --- a/lib/cucumber/cli/options.rb +++ b/lib/cucumber/cli/options.rb @@ -63,7 +63,7 @@ class Options PROFILE_SHORT_FLAG, PROFILE_LONG_FLAG, RETRY_FLAG, RETRY_TOTAL_FLAG, '-l', '--lines', '--port', '-I', '--snippet-type' ].freeze - ORDER_TYPES = %w[defined random].freeze + ORDER_TYPES = %w[defined random reversed].freeze TAG_LIMIT_MATCHER = /(?@\w+):(?\d+)/x.freeze def self.parse(args, out_stream, error_stream, options = {}) @@ -146,6 +146,7 @@ def parse!(args) *<<~TEXT.split("\n")) do |order| [defined] Run scenarios in the order they were defined (default). [random] Shuffle scenarios before running. + [reverse] Run scenarios in the opposite order to which they were defined. Specify SEED to reproduce the shuffling from a previous run. e.g. --order random:5738 TEXT diff --git a/lib/cucumber/configuration.rb b/lib/cucumber/configuration.rb index 7ce2c73a03..db394caec1 100644 --- a/lib/cucumber/configuration.rb +++ b/lib/cucumber/configuration.rb @@ -54,6 +54,10 @@ def randomize? @options[:order] == 'random' end + def reverse_order? + @options[:order] == 'reverse' + end + def seed @options[:seed] end diff --git a/lib/cucumber/filters/randomizer.rb b/lib/cucumber/filters/randomizer.rb index 92cf6d5884..f2fd517c73 100644 --- a/lib/cucumber/filters/randomizer.rb +++ b/lib/cucumber/filters/randomizer.rb @@ -6,6 +6,9 @@ module Cucumber module Filters # Batches up all test cases, randomizes them, and then sends them on class Randomizer + attr_reader :seed + private :seed + def initialize(seed, receiver = nil) @receiver = receiver @test_cases = [] @@ -26,7 +29,7 @@ def done end def with_receiver(receiver) - self.class.new(@seed, receiver) + self.class.new(seed, receiver) end private @@ -34,12 +37,9 @@ def with_receiver(receiver) def shuffled_test_cases digester = Digest::SHA2.new(256) @test_cases.map.with_index - .sort_by { |_, index| digester.digest((@seed + index).to_s) } + .sort_by { |_, index| digester.digest((seed + index).to_s) } .map { |test_case, _| test_case } end - - attr_reader :seed - private :seed end end end diff --git a/lib/cucumber/filters/reverser.rb b/lib/cucumber/filters/reverser.rb new file mode 100644 index 0000000000..6bc21c3f47 --- /dev/null +++ b/lib/cucumber/filters/reverser.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +require 'digest/sha2' + +module Cucumber + module Filters + # Reverses the order of test cases + class Reverser + attr_reader :seed + private :seed + + def initialize(receiver = nil) + @receiver = receiver + @test_cases = [] + end + + def test_case(test_case) + @test_cases << test_case + self + end + + def done + reversed_test_cases.each do |test_case| + test_case.describe_to(@receiver) + end + @receiver.done + self + end + + def with_receiver(receiver) + self.class.new(receiver) + end + + private + + def reversed_test_cases + @test_cases.reverse + end + end + end +end diff --git a/lib/cucumber/runtime.rb b/lib/cucumber/runtime.rb index da05e6f211..3315fd171d 100644 --- a/lib/cucumber/runtime.rb +++ b/lib/cucumber/runtime.rb @@ -244,6 +244,7 @@ def filters filters << Cucumber::Core::Test::NameFilter.new(name_regexps) filters << Cucumber::Core::Test::LocationsFilter.new(filespecs.locations) filters << Filters::Randomizer.new(@configuration.seed) if @configuration.randomize? + filters << Filters::Reverser.new if @configuration.reverse_order? # TODO: can we just use Glue::RegistryAndMore's step definitions directly? step_match_search = StepMatchSearch.new(@support_code.registry.method(:step_matches), @configuration) filters << Filters::ActivateSteps.new(step_match_search, @configuration) From 743ce0967744bac609edf643ea473bf88ef540b6 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 17:22:16 +0000 Subject: [PATCH 4/8] Fix name of profile and ensure autoload --- lib/cucumber/cli/options.rb | 2 +- lib/cucumber/filters.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb index 3859f5a277..218112e54d 100644 --- a/lib/cucumber/cli/options.rb +++ b/lib/cucumber/cli/options.rb @@ -63,7 +63,7 @@ class Options PROFILE_SHORT_FLAG, PROFILE_LONG_FLAG, RETRY_FLAG, RETRY_TOTAL_FLAG, '-l', '--lines', '--port', '-I', '--snippet-type' ].freeze - ORDER_TYPES = %w[defined random reversed].freeze + ORDER_TYPES = %w[defined random reverse].freeze TAG_LIMIT_MATCHER = /(?@\w+):(?\d+)/x.freeze def self.parse(args, out_stream, error_stream, options = {}) diff --git a/lib/cucumber/filters.rb b/lib/cucumber/filters.rb index 6ca9c5d023..d14c38bdd4 100644 --- a/lib/cucumber/filters.rb +++ b/lib/cucumber/filters.rb @@ -9,6 +9,7 @@ require 'cucumber/filters/prepare_world' require 'cucumber/filters/quit' require 'cucumber/filters/randomizer' +require 'cucumber/filters/reverser' require 'cucumber/filters/retry' require 'cucumber/filters/tag_limits' require 'cucumber/filters/broadcast_test_case_ready_event' From 3d164fcb1a35de0508fafee148593d5ec0874f1a Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 17:25:37 +0000 Subject: [PATCH 5/8] Fixed test for reverse order regular --- features/docs/cli/ordering.feature | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/features/docs/cli/ordering.feature b/features/docs/cli/ordering.feature index d2366413f8..7a35bcfc66 100644 --- a/features/docs/cli/ordering.feature +++ b/features/docs/cli/ordering.feature @@ -96,7 +96,7 @@ Feature: Ordering Scenario: Depend on state from a preceding scenario When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_1.feature:7:in `I depend on the state' Feature: Unrelated @@ -110,7 +110,7 @@ Feature: Ordering Scenario: Depend on state from a preceding feature When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_2.feature:4:in `I depend on the state' Feature: Bad practice, part 1 @@ -144,7 +144,7 @@ Feature: Ordering Scenario: Depend on state from a preceding scenario When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_1.feature:7:in `I depend on the state' Feature: Bad practice, part 2 @@ -152,7 +152,7 @@ Feature: Ordering Scenario: Depend on state from a preceding feature When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_2.feature:4:in `I depend on the state' Feature: Bad practice, part 1 @@ -177,11 +177,6 @@ Feature: Ordering Then it should fail And the stdout should contain exactly: """ - Feature: Bad practice, part 1 - - Scenario: Set state - Given I set some state - Feature: Unrelated @skipme @@ -193,7 +188,7 @@ Feature: Ordering Scenario: Depend on state from a preceding feature When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_2.feature:4:in `I depend on the state' Feature: Bad practice, part 1 @@ -201,17 +196,18 @@ Feature: Ordering Scenario: Depend on state from a preceding scenario When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_1.feature:7:in `I depend on the state' + Scenario: Set state + Given I set some state + Failing Scenarios: cucumber features/bad_practice_part_2.feature:3 cucumber features/bad_practice_part_1.feature:6 4 scenarios (2 failed, 2 passed) 4 steps (2 failed, 2 passed) - - Randomized with seed 41544 """ @global_state @@ -224,7 +220,7 @@ Feature: Ordering Scenario: Depend on state from a preceding scenario When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_1.feature:7:in `I depend on the state' Feature: Bad practice, part 2 @@ -232,7 +228,7 @@ Feature: Ordering Scenario: Depend on state from a preceding feature When I depend on the state I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `/^I depend on the state$/' + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' features/bad_practice_part_2.feature:4:in `I depend on the state' Feature: Bad practice, part 1 From a90a2bc81818fe6637412b8cfdafe2b0d9f5ed20 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 17:27:38 +0000 Subject: [PATCH 6/8] Fix up test for reverse with a skipped scenario --- features/docs/cli/ordering.feature | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/features/docs/cli/ordering.feature b/features/docs/cli/ordering.feature index 7a35bcfc66..1c49a98cbd 100644 --- a/features/docs/cli/ordering.feature +++ b/features/docs/cli/ordering.feature @@ -213,16 +213,9 @@ Feature: Ordering @global_state Scenario: Run scenarios in reverse order with some skipped When I run `cucumber --tags "not @skipme" --order reverse -q` - Then it should fail with exactly: + Then it should fail + And the stdout should contain exactly: """ - Feature: Bad practice, part 1 - - Scenario: Depend on state from a preceding scenario - When I depend on the state - I expect the state to be set! (RuntimeError) - ./features/step_definitions/steps.rb:6:in `"I depend on the state"' - features/bad_practice_part_1.feature:7:in `I depend on the state' - Feature: Bad practice, part 2 Scenario: Depend on state from a preceding feature @@ -233,16 +226,19 @@ Feature: Ordering Feature: Bad practice, part 1 + Scenario: Depend on state from a preceding scenario + When I depend on the state + I expect the state to be set! (RuntimeError) + ./features/step_definitions/steps.rb:6:in `"I depend on the state"' + features/bad_practice_part_1.feature:7:in `I depend on the state' + Scenario: Set state Given I set some state Failing Scenarios: - cucumber features/bad_practice_part_1.feature:6 cucumber features/bad_practice_part_2.feature:3 + cucumber features/bad_practice_part_1.feature:6 3 scenarios (2 failed, 1 passed) 3 steps (2 failed, 1 passed) - - Randomized with seed 41544 - """ From c27f670b9fe24a1a9d2684ac7ece2cd9cc39d457 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 15 Dec 2025 17:21:11 +0000 Subject: [PATCH 7/8] Newly generated todo file --- .rubocop_todo.yml | 61 +++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 44 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 687a6729e2..04797e16a5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2025-03-14 09:41:32 UTC using RuboCop version 1.69.2. +# on 2025-12-15 17:20:38 UTC using RuboCop version 1.71.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -11,6 +11,7 @@ # TODO - [LH] -> Jul '24 - 369 files inspected, 661 offenses detected, 98 offenses autocorrectable # TODO - [LH] -> Jan '25 (Updated deps and v10 prep) - 369 files inspected, 704 offenses detected, 112 offenses autocorrectable # TODO - [LH] -> Mar '25 (v10 prep) - 370 files inspected, 721 offenses detected, 116 offenses autocorrectable +# TODO - [LH] -> Dec '25 - 375 files inspected, 713 offenses detected, 109 offenses autocorrectable # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -46,7 +47,7 @@ Lint/UselessMethodDefinition: Exclude: - 'lib/cucumber/glue/proto_world.rb' -# Offense count: 61 +# Offense count: 62 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: Max: 127 @@ -55,29 +56,29 @@ Metrics/AbcSize: # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. # AllowedMethods: refine Metrics/BlockLength: - Max: 52 + Max: 53 # Offense count: 13 # Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: - Max: 515 + Max: 516 -# Offense count: 8 +# Offense count: 7 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: Max: 12 -# Offense count: 76 +# Offense count: 78 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: - Max: 64 + Max: 65 # Offense count: 15 # Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: Max: 804 -# Offense count: 8 +# Offense count: 7 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: Max: 13 @@ -146,7 +147,7 @@ RSpec/EmptyExampleGroup: - 'spec/cucumber/filters/activate_steps_spec.rb' - 'spec/cucumber/running_test_case_spec.rb' -# Offense count: 74 +# Offense count: 70 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 58 @@ -178,12 +179,12 @@ RSpec/ExpectInHook: - 'spec/cucumber/multiline_argument/data_table_spec.rb' - 'spec/cucumber/runtime/meta_message_builder_spec.rb' -# Offense count: 13 +# Offense count: 14 RSpec/ExpectOutput: Exclude: - 'spec/cucumber/formatter/interceptor_spec.rb' -# Offense count: 65 +# Offense count: 63 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, each, example @@ -197,7 +198,7 @@ RSpec/IndexedLet: - 'spec/cucumber/filters/retry_spec.rb' - 'spec/cucumber/glue/registry_and_more_spec.rb' -# Offense count: 36 +# Offense count: 37 # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: @@ -211,24 +212,14 @@ RSpec/MatchArray: Exclude: - 'spec/cucumber/cli/configuration_spec.rb' -# Offense count: 5 +# Offense count: 4 # Configuration parameters: EnforcedStyle. # SupportedStyles: have_received, receive RSpec/MessageSpies: Exclude: - - 'spec/cucumber/deprecate_spec.rb' - 'spec/cucumber/formatter/io_http_buffer_spec.rb' - 'spec/cucumber/runtime/hooks_examples.rb' -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: hash, symbol -RSpec/MetadataStyle: - Exclude: - - 'compatibility/cck_spec.rb' - - 'spec/cucumber/project_initializer_spec.rb' - # Offense count: 15 RSpec/MissingExampleGroupArgument: Exclude: @@ -236,11 +227,11 @@ RSpec/MissingExampleGroupArgument: - 'spec/cucumber/formatter/fail_fast_spec.rb' - 'spec/cucumber/formatter/rerun_spec.rb' -# Offense count: 58 +# Offense count: 60 RSpec/MultipleExpectations: Max: 3 -# Offense count: 38 +# Offense count: 39 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 10 @@ -300,11 +291,6 @@ RSpec/RepeatedExample: - 'spec/cucumber/formatter/rerun_spec.rb' - 'spec/cucumber/world/pending_spec.rb' -# Offense count: 2 -RSpec/RepeatedExampleGroupDescription: - Exclude: - - 'spec/cucumber/glue/proto_world_spec.rb' - # Offense count: 3 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AutoCorrect. @@ -312,12 +298,6 @@ RSpec/ScatteredLet: Exclude: - 'spec/cucumber/runtime/support_code_spec.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -RSpec/SortMetadata: - Exclude: - - 'compatibility/cck_spec.rb' - # Offense count: 1 # Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. # Include: **/*_spec.rb @@ -357,12 +337,6 @@ RSpec/VerifiedDoubles: - 'spec/cucumber/runtime/support_code_spec.rb' - 'spec/cucumber/world/pending_spec.rb' -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Security/YAMLLoad: - Exclude: - - 'lib/cucumber/cli/profile_loader.rb' - # Offense count: 3 Style/ClassVars: Exclude: @@ -400,13 +374,12 @@ Style/RedundantFreeze: - 'lib/cucumber/runtime.rb' - 'lib/cucumber/term/ansicolor.rb' -# Offense count: 6 +# Offense count: 5 # This cop supports safe autocorrection (--autocorrect). Style/StderrPuts: Exclude: - 'examples/i18n/Rakefile' - 'lib/cucumber/cli/main.rb' - - 'lib/cucumber/deprecate.rb' - 'lib/cucumber/formatter/unicode.rb' - 'lib/cucumber/rake/task.rb' - 'spec/cucumber/formatter/interceptor_spec.rb' From 1ef0cdf6dcd3592e04f77ba88ebdd3fa78a3d772 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 15 Dec 2025 17:22:18 +0000 Subject: [PATCH 8/8] Add changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f07d81097..e010bd2ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber. ## [Unreleased] +### Added +- Added a new option for running order `--reverse` which will run the scenarios in reverse order ([#1807](https://github.com/cucumber/cucumber-ruby/pull/1807) [luke-hill](https://github.com/luke-hill)) ## [10.2.0] - 2025-12-10 ### Changed