@@ -12,7 +12,7 @@ class AcceptanceTest < ActiveSupport::TestCase
12
12
DEFAULT_SPEEDUP = 0.8
13
13
14
14
def rails_version
15
- ENV [ 'RAILS_VERSION' ] || '~> 5 .0.0'
15
+ ENV [ 'RAILS_VERSION' ] || '~> 6 .0.0'
16
16
end
17
17
18
18
# Extension point for spring-watchers-listen
@@ -503,18 +503,16 @@ def exec_name
503
503
assert_failure %(bin/rails runner 'require "sqlite3"') , stderr : "sqlite3"
504
504
end
505
505
506
- if RUBY_VERSION >= "2.0.0"
507
- test "changing the gems.rb works" do
508
- FileUtils . mv ( app . gemfile , app . gems_rb )
509
- FileUtils . mv ( app . gemfile_lock , app . gems_locked )
506
+ test "changing the gems.rb works" do
507
+ FileUtils . mv ( app . gemfile , app . gems_rb )
508
+ FileUtils . mv ( app . gemfile_lock , app . gems_locked )
510
509
511
- assert_success %(bin/rails runner 'require "sqlite3"')
510
+ assert_success %(bin/rails runner 'require "sqlite3"')
512
511
513
- File . write ( app . gems_rb , app . gems_rb . read . sub ( %{gem 'sqlite3'} , %{# gem 'sqlite3'} ) )
514
- app . await_reload
512
+ File . write ( app . gems_rb , app . gems_rb . read . sub ( %{gem 'sqlite3'} , %{# gem 'sqlite3'} ) )
513
+ app . await_reload
515
514
516
- assert_failure %(bin/rails runner 'require "sqlite3"') , stderr : "sqlite3"
517
- end
515
+ assert_failure %(bin/rails runner 'require "sqlite3"') , stderr : "sqlite3"
518
516
end
519
517
520
518
test "changing the Gemfile works when Spring calls into itself" do
@@ -531,23 +529,21 @@ def exec_name
531
529
assert_success [ %(bin/rails runner 'load Rails.root.join("script.rb")') , timeout : 60 ]
532
530
end
533
531
534
- if RUBY_VERSION >= "2.0.0"
535
- test "changing the gems.rb works when spring calls into itself" do
536
- FileUtils . mv ( app . gemfile , app . gems_rb )
537
- FileUtils . mv ( app . gemfile_lock , app . gems_locked )
532
+ test "changing the gems.rb works when spring calls into itself" do
533
+ FileUtils . mv ( app . gemfile , app . gems_rb )
534
+ FileUtils . mv ( app . gemfile_lock , app . gems_locked )
538
535
539
- File . write ( app . path ( "script.rb" ) , <<-RUBY . strip_heredoc )
540
- gemfile = Rails.root.join("gems.rb")
541
- File.write(gemfile, "\# {gemfile.read}gem 'text'\\ n")
542
- Bundler.with_clean_env do
543
- system(#{ app . env . inspect } , "bundle install")
544
- end
545
- output = `\# {Rails.root.join('bin/rails')} runner 'require "text"; puts "done";'`
546
- exit output.include? "done\n "
547
- RUBY
536
+ File . write ( app . path ( "script.rb" ) , <<-RUBY . strip_heredoc )
537
+ gemfile = Rails.root.join("gems.rb")
538
+ File.write(gemfile, "\# {gemfile.read}gem 'text'\\ n")
539
+ Bundler.with_clean_env do
540
+ system(#{ app . env . inspect } , "bundle install")
541
+ end
542
+ output = `\# {Rails.root.join('bin/rails')} runner 'require "text"; puts "done";'`
543
+ exit output.include? "done\n "
544
+ RUBY
548
545
549
- assert_success [ %(bin/rails runner 'load Rails.root.join("script.rb")') , timeout : 60 ]
550
- end
546
+ assert_success [ %(bin/rails runner 'load Rails.root.join("script.rb")') , timeout : 60 ]
551
547
end
552
548
553
549
test "changing the environment between runs" do
0 commit comments