File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,19 @@ module CC::Engine
32
32
expect ( attributes [ "location" ] [ "positions" ] [ "end" ] [ "line" ] ) . to eq ( 10 )
33
33
expect ( attributes [ "location" ] [ "positions" ] [ "begin" ] [ "column" ] ) . to eq ( 4 )
34
34
expect ( attributes [ "location" ] [ "positions" ] [ "end" ] [ "column" ] ) . to eq ( 100 )
35
- expect ( attributes [ "content" ] [ "body" ] . squish ) . to include (
36
- "This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum."
37
- )
35
+ expect ( attributes [ "content" ] ) . to be_nil
36
+ end
37
+
38
+ context "with documentation" do
39
+ let ( :offense ) { super ( ) . tap { |offense | offense . cop_name = "Style/Alias" } }
40
+
41
+ it "includes the documentation in the returned json" do
42
+ issue = Issue . new ( offense , "app/models/user.rb" )
43
+ attributes = JSON . parse ( issue . to_json )
44
+ expect ( attributes [ "content" ] [ "body" ] . squish ) . to include (
45
+ "This cop enforces the use of either `#alias` or `#alias_method` depending on configuration."
46
+ )
47
+ end
38
48
end
39
49
end
40
50
You can’t perform that action at this time.
0 commit comments