File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 192192 context 'when configuration is empty' do
193193 include_examples 'autocorrect' ,
194194 'it "should have trait" do end' ,
195- 'it "haves trait" do end'
195+ 'it "has trait" do end'
196196
197197 include_examples 'autocorrect' ,
198198 'it "should only fail" do end' ,
Original file line number Diff line number Diff line change 5555 end
5656 end
5757
58- it 'doubles that have no name specified' do
59- expect_offense ( <<-RUBY )
60- it do
61- foo = double
62- ^^^^^^ Prefer using verifying doubles over normal doubles.
63- end
64- RUBY
65- end
58+ context 'when configured not to ignore nameless doubles' do
59+ let ( :cop_config ) { { 'IgnoreNameless' => false } }
6660
67- context 'when configured to ignore nameless doubles' do
68- let ( :cop_config ) { { 'IgnoreNameless' => true } }
69-
70- it 'ignores doubles that have no name specified' do
71- expect_no_offenses ( <<-RUBY )
61+ it 'flags doubles that have no name specified' do
62+ expect_offense ( <<-RUBY )
7263 it do
7364 foo = double
65+ ^^^^^^ Prefer using verifying doubles over normal doubles.
7466 end
7567 RUBY
7668 end
7769 end
7870
71+ it 'ignores doubles that have no name specified' do
72+ expect_no_offenses ( <<-RUBY )
73+ it do
74+ foo = double
75+ end
76+ RUBY
77+ end
78+
7979 it 'ignores instance_doubles' do
8080 expect_no_offenses ( <<-RUBY )
8181 it do
You can’t perform that action at this time.
0 commit comments