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
parent4decd9a882fb1b283d6590304e234a17253eed08 (diff)
Fix test harness support for sprockets-rails 3
-rw-r--r--Rakefile16
-rw-r--r--test/support/dummy_rails_integration.rb2
2 files changed, 10 insertions, 8 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]
diff --git a/test/support/dummy_rails_integration.rb b/test/support/dummy_rails_integration.rb
index 82e975f..9dbc254 100644
--- a/test/support/dummy_rails_integration.rb
+++ b/test/support/dummy_rails_integration.rb
@@ -24,6 +24,6 @@ module DummyRailsIntegration
private
def cleanup_dummy_rails_files
FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
- FileUtils.rm Dir.glob('test/dummy_rails/public/assets/*')
+ FileUtils.rm Dir.glob('test/dummy_rails/public/assets/{.[^\.]*,*}')
end
end