Skip to content

Commit e19b594

Browse files
committed
Ensure original Gemfile
1 parent eeaf1ad commit e19b594

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/support/acceptance_test.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ def exec_name
501501
app.await_reload
502502

503503
assert_failure %(bin/rails runner 'require "sqlite3"'), stderr: "sqlite3"
504+
505+
File.write(app.gemfile, app.gemfile.read.gsub(%{# gem 'sqlite3'}, %{gem 'sqlite3'}))
504506
end
505507

506508
if RUBY_VERSION >= "2.0.0"
@@ -514,6 +516,11 @@ def exec_name
514516
app.await_reload
515517

516518
assert_failure %(bin/rails runner 'require "sqlite3"'), stderr: "sqlite3"
519+
520+
File.write(app.gems_rb, app.gems_rb.read.gsub(%{# gem 'sqlite3'}, %{gem 'sqlite3'}))
521+
522+
FileUtils.mv(app.gems_rb, app.gemfile)
523+
FileUtils.mv(app.gems_locked, app.gemfile_lock)
517524
end
518525
end
519526

@@ -547,6 +554,9 @@ def exec_name
547554
RUBY
548555

549556
assert_success [%(bin/rails runner 'load Rails.root.join("script.rb")'), timeout: 60]
557+
558+
FileUtils.mv(app.gems_rb, app.gemfile)
559+
FileUtils.mv(app.gems_locked, app.gemfile_lock)
550560
end
551561
end
552562

0 commit comments

Comments
 (0)