<NME> fake_objects.rb
<BEF> ADDFILE
<MSG> Upgrade rubocop (#1566)

* Upgrade Rubocop to 0.92

* Fix offence: explicitely extend Object class

* Restore the extension of the global namespace

Ignore rubocop for that specific line
And added comments to explain why.

* Upgrade rubocop to 1.0

* Apply safe auto-correct

* Apply unsafe autocorrect

* Apply manual updaates to fix rubocop offenses

* Refactor calculator example to prevent disabling rubocop

* Do not fail fast workflow

* Fix jruby CI job

* Add ruby 2.3 to CI

* Revert "Add ruby 2.3 to CI"

This reverts commit 9203b24fe082e56e904a32479e1c664fed8b212e.

* Upgrade rubocop to 1.1.0

* Remove disabling of rubocop/redundant begin

We actually do not support ruby 2.3 anymore

* Fix broken tests after merging main

* Remove inline rubocop magic comment

* Fix rubocop Style/RegexpLiteral offenses

* Remove a few rubocop magic comments

* Bump rubotop to 1.4

* Fix Cucumber::Undefined Style/RaiseArgs error

* Bump rubocop to 1.10.0

* Fix offense with regexp

* Disable Metrics/ParameterLists with Cucumber::Cli::Main#initialize

* Bump rubocop to 1.18.4

* Bump rubocop to 1.19.1

* Fix offenses

* Bump rubocop to v1.22.3

* Remove exclusion of Bundler/DuplicatedGem

* Enable Layout/EndOfLine: we don't use Appveyor anymore

* Enable Layout/EmptyLineAfterGuardClause

* Autocorrect Layout/EmptyLineAfterGuardClause

* Enforce LF with Layout/EndOfLine

* Update spec/support/fake_objects.rb

Co-authored-by: Luke Hill <7de25bb02920a50e843baee7df9e655658939e26@users.noreply.github.com>

* Fix typo in comments

* Update lib/cucumber/glue/step_definition.rb

Co-authored-by: Luke Hill <7de25bb02920a50e843baee7df9e655658939e26@users.noreply.github.com>

* Move some call to 'super' to bottom of methods

* Remove useless code

The initializer of Core::Event already generates sub-classes with
attribute readers.

Refs. https://github.com/cucumber/cucumber-ruby-core/blob/main/lib/cucumber/core/event.rb

* Restore ProtoWorld 'useless' methods for documentation purpose

Co-authored-by: Luke Hill <7de25bb02920a50e843baee7df9e655658939e26@users.noreply.github.com>
<DFF> @@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+require 'cucumber/core/filter'
+
+# The following fake objects was previously declared within `describe` scope.
+# Declaring into scope did not isolate them.
+#
+# Moving these into a dedicated support file explicitly states that these are available globally as soon as they are required once.
+
+module FakeObjects
+  module ModuleOne
+    def method_one
+      1
+    end
+  end
+
+  module ModuleMinusOne
+    def method_one
+      -1
+    end
+  end
+
+  module ModuleTwo
+    def method_two
+      2
+    end
+  end
+
+  module ModuleThree
+    def method_three
+      3
+    end
+  end
+
+  class ClassOne
+  end
+
+  class Actor
+    attr_accessor :name
+
+    def initialize(name)
+      @name = name
+    end
+  end
+
+  class FlakyStepActions < ::Cucumber::Core::Filter.new
+    def test_case(test_case)
+      failing_test_steps = test_case.test_steps.map do |step|
+        step.with_action { raise Failure }
+      end
+      passing_test_steps = test_case.test_steps.map do |step|
+        step.with_action {}
+      end
+
+      test_case.with_steps(failing_test_steps).describe_to(receiver)
+      test_case.with_steps(passing_test_steps).describe_to(receiver)
+    end
+  end
+end

{'addition_count': 59, 'commit_subject': 'Upgrade rubocop (#1566)', 'deletion_count': 0, 'file_extension': '.rb', 'lang': 'rb', 'license': 'mit', 'repo_name': 'cucumber/cucumber-ruby'}