rubocop-rspec
rubocop-rspec copied to clipboard
Cop Idea: use fixture_path
We've got a lot of places in our codebase where people do:
# bad
Rails.root.join('spec', 'fixtures', 'something.pdf')
It would be great to have a cop to enforce using RSpec.configuration.fixture_path
:
# good
File.join(fixture_path, 'something.pdf')