Skip to content

Commit e0fd6e9

Browse files
committed
Tweak a spec for Rails/UnknownEnv
Follow up #894 (comment)
1 parent ea1fae9 commit e0fd6e9

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

spec/rubocop/cop/rails/unknown_env_spec.rb

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,8 @@
8484
RUBY
8585
end
8686

87-
context 'Rails 7.1' do
88-
let(:config) do
89-
RuboCop::Config.new(
90-
{
91-
'AllCops' => {
92-
'TargetRailsVersion' => '7.1'
93-
},
94-
'Rails/UnknownEnv' => {
95-
'Environments' => %w[
96-
development
97-
production
98-
test
99-
]
100-
}
101-
}
102-
)
103-
end
104-
105-
it 'accepts local as an environment name on Rails 7.1' do
87+
context 'when Rails 7.1 or newer', :rails71 do
88+
it 'accepts local as an environment name' do
10689
expect_no_offenses(<<~RUBY)
10790
Rails.env.local?
10891
Rails.env == 'local'

0 commit comments

Comments
 (0)