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

Prevent breaking change for assertion message in test #247

Commits on Mar 25, 2023

  1. Prevent breaking change for assertion message in test

    Follow up rubocop/rubocop#11729.
    
    This PR prevents breaking change for assertion message in test. e.g.
    
    ```console
    % bundle exec ruby -Itest test/rubocop/cop/minitest/lifecycle_hooks_order_test.rb
    (snip)
    
    Fabulous run in 0.075080s, 93.2339 runs/s, 93.2339 assertions/s.
    
      1) Failure:
    LifecycleHooksOrderTest#test_registers_offense_when_hooks_are_not_before_test_cases [test/rubocop/cop/minitest/lifecycle_hooks_order_test.rb:62]:
    --- expected
    +++ actual
    @@ -4,7 +4,7 @@
       end
    
       def setup; end
    -  ^^^^^^^^^^^^^^ `setup` is supposed to appear before `test_something`.
    +  ^^^^^^^^^^^^^^ Minitest/LifecycleHooksOrder: `setup` is supposed to appear before `test_something`.
       def teardown; end
     end
     "
    ```
    koic committed Mar 25, 2023
    Configuration menu
    Copy the full SHA
    a96a985 View commit details
    Browse the repository at this point in the history