Skip to content

Commit

Permalink
(Maint) Do not overwrite file output
Browse files Browse the repository at this point in the history
The windows spec code resets the output streams so that it can handle
color correctly. In doing so it assumed that everything was writing to
stdout, which is not the case when -o is used on the command line.
  • Loading branch information
zaphod42 committed Apr 11, 2013
1 parent 5689cca commit 0babce6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -67,7 +67,12 @@ module PuppetSpec
if Puppet::Util::Platform.windows?
config.output_stream = $stdout
config.error_stream = $stderr
config.formatters.each { |f| f.instance_variable_set(:@output, $stdout) }

config.formatters.each do |f|
if not f.instance_variable_get(:@output).kind_of?(::File)
f.instance_variable_set(:@output, $stdout)
end
end
end

Puppet::Test::TestHelper.initialize
Expand Down

0 comments on commit 0babce6

Please sign in to comment.