Skip to content

Commit

Permalink
Can't fool me
Browse files Browse the repository at this point in the history
This spec would fail with the modern implementation...
  • Loading branch information
marcandre committed May 23, 2020
1 parent 36532ba commit 50dbe8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/rubocop/cop/cop_spec.rb
Expand Up @@ -171,7 +171,9 @@
context 'when offense was corrected' do
before do
allow(cop).to receive(:autocorrect?).and_return(true)
allow(cop).to receive(:autocorrect).and_return(->(_corrector) {})
allow(cop).to receive(:autocorrect).and_return(->(corrector) do
corrector.insert_before(location, 'hi!')
end)
end

it 'is set to true' do
Expand Down

0 comments on commit 50dbe8c

Please sign in to comment.