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 30, 2020
1 parent 858e0f1 commit fb8150b
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(lambda do |corrector|
corrector.insert_before(location, 'hi!')
end)
end

it 'is set to true' do
Expand Down

0 comments on commit fb8150b

Please sign in to comment.