We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b1893a commit cdd02a1Copy full SHA for cdd02a1
spec/cc/engine/rubocop_spec.rb
@@ -42,6 +42,26 @@ def method
42
assert !includes_check?(output, "Lint/UselessAssignment")
43
end
44
45
+ it "respects the default .rubocop.yml file" do
46
+ create_source_file("foo.rb", <<-EORUBY)
47
+ def method
48
+ unused = "x" and "y"
49
+
50
+ return false
51
+ end
52
+ EORUBY
53
54
+ create_source_file(
55
+ ".rubocop.yml",
56
+ "Lint/UselessAssignment:\n Enabled: false\n"
57
+ )
58
59
+ output = run_engine
60
61
+ assert includes_check?(output, "Style/AndOr")
62
+ assert !includes_check?(output, "Lint/UselessAssignment")
63
64
65
it "reads a file with a #!.*ruby declaration at the top" do
66
create_source_file("my_script", <<-EORUBY)
67
#!/usr/bin/env ruby
0 commit comments