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 offenses #551

Merged
merged 2 commits into from
Jun 22, 2022
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 features/support/cucumber_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def remove_gem(name)

def bundle_install
run_command_and_stop 'bundle config set --local without "development"'
run_command_and_stop "bundle config set --local path '#{ENV['GITHUB_WORKSPACE']}/vendor/bundle'" if ENV.key?('GITHUB_WORKSPACE')
run_command_and_stop "bundle config set --local path '#{ENV.fetch('GITHUB_WORKSPACE')}/vendor/bundle'" if ENV.key?('GITHUB_WORKSPACE')
run_command_and_stop 'bundle install --jobs 4'
end

Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require 'cucumber/rails/application'
ENV['RAILS_ENV'] ||= 'test'
ENV['RAILS_ROOT'] ||= File.expand_path("#{env_caller}/../..")
require File.expand_path("#{ENV['RAILS_ROOT']}/config/environment")
require File.expand_path("#{ENV.fetch('RAILS_ROOT')}/config/environment")
require 'cucumber/rails/action_dispatch'
require 'rails/test_help'

Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/rails/world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Rails
class << self
def include_rack_test_helpers?
# Using ActiveModel Boolean casting here will give false positives more often than not!
!ENV['CR_REMOVE_RACK_TEST_HELPERS']&.casecmp('true')&.zero?
!ENV.fetch('CR_REMOVE_RACK_TEST_HELPERS', '').casecmp('true').zero?
end
end
end
Expand Down