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 | |
parent | 4decd9a882fb1b283d6590304e234a17253eed08 (diff) |
Fix test harness support for sprockets-rails 3
-rw-r--r-- | Rakefile | 16 | ||||
-rw-r--r-- | test/support/dummy_rails_integration.rb | 2 |
2 files changed, 10 insertions, 8 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] 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 |