8000 Persist the correct Gemfile to each test app (#5790) · activeadmin/activeadmin@3dc13b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dc13b6

Browse files
deivid-rodriguezjavierjulio
authored andcommitted
Persist the correct Gemfile to each test app (#5790)
With this, we no longer need to mess with `BUNDLE_GEMFILE`'s when booting applications for different Rails versions, and each application will always use the right Gemfile. We can even boot applications from the root folder like this: `tmp/rails/rails-6.0.0.rc1/bin/rails s` and it will just work.
1 parent 8eac436 commit 3dc13b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/support/rails_template.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
5454
RUBY
5555

56+
gsub_file 'config/boot.rb', /^.*BUNDLE_GEMFILE.*$/, <<-RUBY
57+
ENV['BUNDLE_GEMFILE'] = "#{File.expand_path(ENV['BUNDLE_GEMFILE'])}"
58+
RUBY
59+
5660
# Setup Active Admin
5761
generate 'active_admin:install'
5862

0 commit comments

Comments
 (0)
0