File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class InstallerTest < ActiveSupport::TestCase
1111 end
1212 run_command ( "bin/rails" , "turbo:install" )
1313
14- assert_match %(import "@hotwired/turbo-rails"\n ) , File . read ( "app/javascript/application.js" )
14+ if Gem ::Version . new ( Rails . version ) >= Gem ::Version . new ( "7.0" )
15+ assert_match %(import "@hotwired/turbo-rails"\n ) , File . read ( "app/javascript/application.js" )
16+ end
1517
1618 if Rails ::VERSION ::MAJOR >= 7
1719 assert_match %(pin "@hotwired/turbo-rails", to: "turbo.min.js") , File . read ( "config/importmap.rb" )
@@ -39,6 +41,7 @@ class InstallerTest < ActiveSupport::TestCase
3941 run_command ( "bin/rails" , "turbo:install" )
4042
4143 assert_match "// pre-existing" , File . read ( "app/javascript/application.js" )
44+ assert_match %(import "@hotwired/turbo-rails"\n ) , File . read ( "app/javascript/application.js" )
4245 end
4346 end
4447
You can’t perform that action at this time.
0 commit comments