diff --git a/test/helper_test.rb b/test/helper_test.rb index cc1004c4..deadb3b3 100644 --- a/test/helper_test.rb +++ b/test/helper_test.rb @@ -181,8 +181,8 @@ def test_vite_image_tag } end - if Rails.gem_version >= Gem::Version.new('7.1.0') - def test_vite_picture_tag + def test_vite_picture_tag + if Rails.gem_version >= Gem::Version.new('7.1.0') assert_equal <<~HTML.gsub(/\n\s*/, ''), vite_picture_tag('images/logo.svg', 'images/logo.png', class: 'test', image: { alt: 'Logo' }) @@ -190,6 +190,10 @@ def test_vite_picture_tag Logo HTML + else + assert_raises(NotImplementedError, /vite_picture_tag/) { + vite_picture_tag + } end end end