Auto correct for UnusedLet does not play nicely with heredocs
Closed this issue · 2 comments
backus commented
Reproduction:
$ cat repro_spec.rb
RSpec.describe 'reproduction' do
let(:foo) { <<-EOM }
this is
a heredoc
EOM
it 'does not use the heredoc' do
end
end
$ bundle exec rspec repro_spec.rb
Randomized with seed 22964
.
Finished in 0.00073 seconds (files took 0.59494 seconds to load)
1 example, 0 failures
Randomized with seed 22964
$ bundle exec bin/rspectre --rspec='repro_spec.rb' --auto-correct
$ cat repro_spec.rb
RSpec.describe 'reproduction' do
this is
a heredoc
EOM
it 'does not use the heredoc' do
end
end
backus commented
🎈!