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

Fix specs for code transparently fixed with RuboCop 0.84 update #914

Merged
merged 4 commits into from
May 24, 2020

Commits on May 21, 2020

  1. Fix specs

    It seems that RuboCop comes with certain fixes that improve how RuboCop
    RSpec works!
    pirj committed May 21, 2020
    Configuration menu
    Copy the full SHA
    0d63424 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2020

  1. Remove default configuration from specs

    After rubocop/rubocop#7970, all specs with
    the `:config` metadata by default use the default configuration. So now,
    there is often no reason to add a cop's default configuration in specs.
    bquorning committed May 24, 2020
    Configuration menu
    Copy the full SHA
    b9befd3 View commit details
    Browse the repository at this point in the history
  2. Remove explicit subject(:cop) from specs

    In rubocop/rubocop#7970 the shared context
    `config` was updated to include the following:
    
        let(:cop) do
          cop_class.new(config, cop_options)
                   .tap { |cop| cop.processed_source = processed_source }
        end
    
    This is functionally equivalent to what we have all over our specs:
    
        subject(:cop) { described_class.new(config) }
    
    The downside is that our specs become a less explicit. Actually they now
    have a mystery guest, which may be considered a smell.
    bquorning committed May 24, 2020
    Configuration menu
    Copy the full SHA
    4e7272b View commit details
    Browse the repository at this point in the history
  3. Remove ExampleWording specs for empty config

    There is no longer by default a "when configuration is empty" situation
    to test. We always have the default configuration when testing.
    
    The existing tests ("should only fail" -> "onlies fail") did not add
    much value.
    bquorning committed May 24, 2020
    Configuration menu
    Copy the full SHA
    afe426c View commit details
    Browse the repository at this point in the history