Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new RSpec/FileFixture cop #1214

Closed
wants to merge 1 commit into from

Commits on Nov 21, 2021

  1. Add new RSpec/FileFixture cop

    `RSpec` provides the convenience method
    
    ```ruby
    file_fixture('path/some_file.csv')
    ```
    
    which (by default) is equivalent to
    
    ```ruby
    Rails.root.join('spec/fixtures/files/path/some_file.csv')
    ```
    
    We add a cop which detects and autocorrects verbose `Rails.root`
    constructions and works best in combination with
    [`Rails/RootPathnameMethods`](rubocop/rubocop-rails#587).
    leoarnold committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    1f21db6 View commit details
    Browse the repository at this point in the history