Skip to content

Commit becab1c

Browse files
Merge pull request #22 from pocke/rails
2 parents 469d2d5 + d901476 commit becab1c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/mry/added_cops.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ def added_cops_yaml(from:, to:)
147147
cops = added_cops(from: from, to: to)
148148
return if cops.empty?
149149

150-
in_tmpdir do
150+
in_tmpdir do |dir|
151+
dir.join('.rubocop.yml').write(<<~YAML)
152+
Rails:
153+
Enabled: true
154+
YAML
151155
stdout do
152156
RuboCop::CLI.new.run(['--show-cops', cops.join(',')])
153157
end

test/mry/test_added_cops.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_added_cops_yaml
107107
108108
Rails/UnknownEnv:
109109
Description: Use correct environment name.
110-
Enabled: false
110+
Enabled: true
111111
Environments:
112112
- development
113113
- test

test/mry/test_runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_run_with_from_option
259259
260260
Rails/UnknownEnv:
261261
Description: Use correct environment name.
262-
Enabled: false
262+
Enabled: true
263263
Environments:
264264
- development
265265
- test

0 commit comments

Comments
 (0)