Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2016-01-19 12:30:31 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2016-01-19 12:30:31 +0300
commit99b4f34210ade22ed22e9b009023c1b6799ec7e5 (patch)
treed84d2bc70e2e7a3224b622cbb65b3ac89ee2814b /Rakefile
parent4decd9a882fb1b283d6590304e234a17253eed08 (diff)
Fix test harness support for sprockets-rails 3
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Rakefile b/Rakefile
index 8952b26..18ea009 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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]