From 330528bfe0d9c1d4a8780f48158f509974306843 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Tue, 24 Dec 2024 12:10:59 +0900 Subject: [PATCH] Workaround for a build error with Prism 1.3.0 The following test passed with Prism 1.2.0, but started failing with Prism 1.3.0. ```console $ bundle exec rake prism_test (snip) ==> Failures 1) Failure: MultipleAssertionsTest#test_assignments_with_numblocks_are_counted_correctly [test/rubocop/cop/minitest/multiple_assertions_test.rb:244]: --- expected +++ actual @@ -1,6 +1,5 @@ "class FooTest < ActiveSupport::TestCase test \"#render errors include stack traces\" do - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Test case has too many assertions [9/1]. err = assert_raises React::ServerRendering::PrerenderError do assert_equal _1, 1 ``` --- test/rubocop/cop/minitest/multiple_assertions_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/rubocop/cop/minitest/multiple_assertions_test.rb b/test/rubocop/cop/minitest/multiple_assertions_test.rb index 668b5e8..f8f9d55 100644 --- a/test/rubocop/cop/minitest/multiple_assertions_test.rb +++ b/test/rubocop/cop/minitest/multiple_assertions_test.rb @@ -241,6 +241,8 @@ class FooTest < ActiveSupport::TestCase end def test_assignments_with_numblocks_are_counted_correctly + skip 'It passed with Prism 1.2.0, but started failing with Prism 1.3.0.' if ENV['PARSER_ENGINE'] == 'parser_prism' + assert_offense(<<~RUBY) class FooTest < ActiveSupport::TestCase test "#render errors include stack traces" do