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

Fix new RuboCop offense #915

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 1 deletion lib/aruba/basic_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def option_accessor(name, type:, default: nil)
add_option(name, block_given? ? yield(InConfigWrapper.new(known_options)) : default)

Contract type => type
define_method("#{name}=") { |v| find_option(name).value = v }
define_method(:"#{name}=") { |v| find_option(name).value = v }

# Add reader
option_reader name, type: type
Expand Down
16 changes: 8 additions & 8 deletions lib/aruba/cucumber/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,28 @@

## the stderr should contain "hello"
Then "(the ){channel} should contain {string}" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).to include_output_string expected
end

## the stderr should not contain "hello"
Then "(the ){channel} should not contain {string}" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).not_to include_output_string expected
end

## the stderr should contain exactly "hello"
Then "(the ){channel} should contain exactly {string}" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).to output_string_eq expected
end

## the stderr should not contain exactly "hello"
Then "(the ){channel} should not contain exactly {string}" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).not_to output_string_eq expected
end
Expand Down Expand Up @@ -211,28 +211,28 @@

## the stderr should contain:
Then "(the ){channel} should contain:" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).to include_output_string(expected)
end

## the stderr should not contain:
Then "(the ){channel} should not contain:" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).not_to include_output_string(expected)
end

## the stderr should contain exactly:
Then "(the ){channel} should contain exactly:" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).to output_string_eq(expected)
end

## the stderr should not contain exactly:
Then "(the ){channel} should not contain exactly:" do |channel, expected|
combined_output = send("all_#{channel}")
combined_output = send(:"all_#{channel}")

expect(combined_output).not_to output_string_eq(expected)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/support/shared_contexts/aruba.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def create_test_files(files, data = "a")
include Aruba::Api

def set_tag(tag_name, value)
instance_variable_set "@#{tag_name}", value
instance_variable_set :"@#{tag_name}", value
end
end

Expand Down
Loading