@@ -22,16 +22,16 @@ class Fake < ERBLint::Linter
2222 describe "offenses" do
2323 subject { offenses }
2424 context "when file has unused disable comment" do
25- let ( :file ) { "<span></span><%# erblint:disable-line Fake %>" }
25+ let ( :file ) { "<span></span><%# erblint:disable Fake %>" }
2626 before { linter . run ( processed_source , [ ] ) }
2727 it do
2828 expect ( subject . size ) . to ( eq ( 1 ) )
29- expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable-line comment for Fake" ) )
29+ expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable comment for Fake" ) )
3030 end
3131 end
3232
3333 context "when file has a disable comment and a corresponding offense" do
34- let ( :file ) { "<span></span><%# erblint:disable-line Fake %>" }
34+ let ( :file ) { "<span></span><%# erblint:disable Fake %>" }
3535 before do
3636 offense = ERBLint ::Offense . new ( ERBLint ::Linters ::Fake . new ( file_loader , linter_config ) ,
3737 SpecUtils . source_range_for_code ( processed_source , "<span></span>" ) ,
@@ -47,7 +47,7 @@ class Fake < ERBLint::Linter
4747
4848 context "when file has a disable comment in wrong place and a corresponding offense" do
4949 let ( :file ) { <<~FILE }
50- <%# erblint:disable-line Fake %>
50+ <%# erblint:disable Fake %>
5151 <span>bad content</span>
5252 FILE
5353 before do
@@ -62,12 +62,12 @@ class Fake < ERBLint::Linter
6262
6363 it "reports the unused inline comment" do
6464 expect ( subject . size ) . to ( eq ( 1 ) )
65- expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable-line comment for Fake" ) )
65+ expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable comment for Fake" ) )
6666 end
6767 end
6868
6969 context "when file has disable comment for multiple rules" do
70- let ( :file ) { "<span></span><%# erblint:disable-line Fake, Fake2 %>" }
70+ let ( :file ) { "<span></span><%# erblint:disable Fake, Fake2 %>" }
7171 before do
7272 offense = ERBLint ::Offense . new (
7373 ERBLint ::Linters ::Fake . new ( file_loader , linter_config ) ,
@@ -80,14 +80,14 @@ class Fake < ERBLint::Linter
8080
8181 it "reports the unused inline comment" do
8282 expect ( subject . size ) . to ( eq ( 1 ) )
83- expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable-line comment for Fake2" ) )
83+ expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable comment for Fake2" ) )
8484 end
8585 end
8686
8787 context "when file has multiple disable comments for one offense" do
8888 let ( :file ) { <<~ERB }
89- <%# erblint:disable-line Fake %>
90- < span > </ span > <%# erblint:disable-line Fake %>
89+ <%# erblint:disable Fake %>
90+ < span > </ span > <%# erblint:disable Fake %>
9191 ERB
9292 before do
9393 offense = ERBLint ::Offense . new (
@@ -101,7 +101,7 @@ class Fake < ERBLint::Linter
101101
102102 it "reports the unused inline comment" do
103103 expect ( subject . size ) . to ( eq ( 1 ) )
104- expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable-line comment for Fake" ) )
104+ expect ( subject . first . message ) . to ( eq ( "Unused erblint:disable comment for Fake" ) )
105105 end
106106 end
107107 end
0 commit comments