fails but will be considered as passing' end # What's the difference between both test 'example test' do skip('This test is failing lets not run it') if running_on_rails_next? raise StandardError, 'This test fails but will be skipped' end
:allowed attr_writer :state def after_test(test) return unless test_will_fail?(test) @state = ALLOWED end def test_will_fail?(test) return false if not_on_rails_next test.failing_on_rails_next? end def record(result) result.failures.clear if @state == ALLOWED end end end end
DEPRECATION WARNING: Another deprecation test_bar - DEPRECATION WARNING: This code is deprecated class MyTest < MiniTest::Test def test_foo ActiveSupport::Deprecation.warn(‘This code is deprecated') ActiveSupport::Deprecation.warn(‘Another deprecation’) end def test_bar ActiveSupport::Deprecation.warn(‘This code is deprecated’) end end