Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused 3rd arg from Cli::Main #1588

Merged
merged 3 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions features/lib/support/command_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def execute(args)

Cucumber::Cli::Main.new(
argument_list,
nil,
@stdout,
@stderr,
@kernel
Expand Down Expand Up @@ -126,7 +125,6 @@ def execute(task)
.and_wrap_original do |_, *args|
Cucumber::Cli::Main.new(
args[0],
nil,
@stdout,
@stderr,
@kernel
Expand Down
7 changes: 1 addition & 6 deletions lib/cucumber/cli/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ def execute(args)
end
end

# The second argument is there for retrocompatibility
# Removing it will require a breaking change
# But it is actually responsible for a rubycop offense: too many optional parameters
# As we don't want to deactivate that cop globally, we disable it just for the
# following.
def initialize(args, _ = nil, out = $stdout, err = $stderr, kernel = Kernel) # rubocop:disable Metrics/ParameterLists
def initialize(args, out = $stdout, err = $stderr, kernel = Kernel)
@args = args
@out = out
@err = err
Expand Down
3 changes: 1 addition & 2 deletions spec/cucumber/cli/main_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ module Cli
end

let(:args) { [] }
let(:stdin) { StringIO.new }
let(:stdout) { StringIO.new }
let(:stderr) { StringIO.new }
let(:kernel) { double(:kernel) }
subject { Main.new(args, stdin, stdout, stderr, kernel) }
subject { Main.new(args, stdout, stderr, kernel) }

describe '#execute!' do
context 'passed an existing runtime' do
Expand Down