diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2016-01-19 12:30:31 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2016-01-19 12:30:31 +0300 |
commit | 99b4f34210ade22ed22e9b009023c1b6799ec7e5 (patch) | |
tree | d84d2bc70e2e7a3224b622cbb65b3ac89ee2814b /Rakefile | |
parent | 4decd9a882fb1b283d6590304e234a17253eed08 (diff) |
Fix test harness support for sprockets-rails 3
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -18,13 +18,15 @@ task :test_all_gemfiles do env = {'BUNDLE_GEMFILE' => gemfile} cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})" $stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}") - PTY.spawn(env, cmd) do |r, _w, pid| - begin - r.each_line { |l| puts l } - rescue Errno::EIO - # Errno:EIO error means that the process has finished giving output. - ensure - ::Process.wait pid + Bundler.with_clean_env do + PTY.spawn(env, cmd) do |r, _w, pid| + begin + r.each_line { |l| puts l } + rescue Errno::EIO + # Errno:EIO error means that the process has finished giving output. + ensure + ::Process.wait pid + end end end [$? && $?.exitstatus == 0, cmd_with_env] |