Skip to content

Commit

Permalink
Tweak a spec for Rails/UnknownEnv
Browse files Browse the repository at this point in the history
Follow up #894 (comment)
  • Loading branch information
koic committed Oct 16, 2023
1 parent ea1fae9 commit e0fd6e9
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions spec/rubocop/cop/rails/unknown_env_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,8 @@
RUBY
end

context 'Rails 7.1' do
let(:config) do
RuboCop::Config.new(
{
'AllCops' => {
'TargetRailsVersion' => '7.1'
},
'Rails/UnknownEnv' => {
'Environments' => %w[
development
production
test
]
}
}
)
end

it 'accepts local as an environment name on Rails 7.1' do
context 'when Rails 7.1 or newer', :rails71 do
it 'accepts local as an environment name' do
expect_no_offenses(<<~RUBY)
Rails.env.local?
Rails.env == 'local'
Expand Down

0 comments on commit e0fd6e9

Please sign in to comment.