Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 99b4f34

Browse files
committedJan 19, 2016
Fix test harness support for sprockets-rails 3
1 parent 4decd9a commit 99b4f34

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
 

‎Rakefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ task :test_all_gemfiles do
1818
env = {'BUNDLE_GEMFILE' => gemfile}
1919
cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
2020
$stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
21-
PTY.spawn(env, cmd) do |r, _w, pid|
22-
begin
23-
r.each_line { |l| puts l }
24-
rescue Errno::EIO
25-
# Errno:EIO error means that the process has finished giving output.
26-
ensure
27-
::Process.wait pid
21+
Bundler.with_clean_env do
22+
PTY.spawn(env, cmd) do |r, _w, pid|
23+
begin
24+
r.each_line { |l| puts l }
25+
rescue Errno::EIO
26+
# Errno:EIO error means that the process has finished giving output.
27+
ensure
28+
::Process.wait pid
29+
end
2830
end
2931
end
3032
[$? && $?.exitstatus == 0, cmd_with_env]

‎test/support/dummy_rails_integration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ def screenshot!
2424
private
2525
def cleanup_dummy_rails_files
2626
FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
27-
FileUtils.rm Dir.glob('test/dummy_rails/public/assets/*')
27+
FileUtils.rm Dir.glob('test/dummy_rails/public/assets/{.[^\.]*,*}')
2828
end
2929
end

0 commit comments

Comments
 (0)
Please sign in to comment.