Permalink
Browse files

Merge pull request #26592 from prathamesh-sonpatki/fix-4-2-stable-build

Fix 4.2-stable build - Cherry pick "use correct Gemfile in `bin/setup` test"
  • Loading branch information...
guilleiguaran committed Oct 16, 2016
2 parents 38949f9 + c8ba6c0 commit f5ca9de5262c26101ddb9c3596f1fb71206c9c17
Showing with 19 additions and 0 deletions.
  1. +1 −0 .travis.yml
  2. +18 −0 railties/test/application/bin_setup_test.rb
View
@@ -4,6 +4,7 @@ script: 'ci/travis.rb'
before_install:
- "rvm current | grep 'jruby' && export AR_JDBC=true || echo"
- "rm ${BUNDLE_GEMFILE}.lock"
- "gem update bundler"
before_script:
- bundle update
cache: bundler
@@ -6,10 +6,17 @@ class BinSetupTest < ActiveSupport::TestCase
def setup
build_app
create_gemfile
update_boot_file_to_use_bundler
@old_gemfile_env = ENV["BUNDLE_GEMFILE"]
ENV["BUNDLE_GEMFILE"] = app_path + "/Gemfile"
end
def teardown
teardown_app
ENV["BUNDLE_GEMFILE"] = @old_gemfile_env
end
def test_bin_setup
@@ -50,5 +57,16 @@ def test_bin_setup_output
OUTPUT
end
end
private
def create_gemfile
app_file("Gemfile", "source 'https://rubygems.org'")
app_file("Gemfile", "gem 'rails', path: '#{RAILS_FRAMEWORK_ROOT}'", "a")
app_file("Gemfile", "gem 'sqlite3'", "a")
end
def update_boot_file_to_use_bundler
app_file("config/boot.rb", "require 'bundler/setup'")
end
end
end

0 comments on commit f5ca9de

Please sign in to comment.