summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-11 16:40:00 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-07-11 17:09:48 -0700
commitd7d384ec0b7f28a8f0be20defcc2eebd0550aff0 (patch)
treebb092a52efbd07d1166c635c1dfffc61db5479b9 /spec
parent768a063099c8c855488728da77e8dd165816fa83 (diff)
downloadpuppet-d7d384ec0b7f28a8f0be20defcc2eebd0550aff0.tar.gz
puppet-d7d384ec0b7f28a8f0be20defcc2eebd0550aff0.tar.xz
puppet-d7d384ec0b7f28a8f0be20defcc2eebd0550aff0.zip
(#8356) Color defaults to false on Windows
Windows consoles do not support ansi escape sequences for colorizing output. This commit changes the default setting of 'color' to false when the "microsoft_windows" feature is present. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/integration/defaults_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb
index 9bec769ab..a165838c3 100755
--- a/spec/integration/defaults_spec.rb
+++ b/spec/integration/defaults_spec.rb
@@ -277,4 +277,14 @@ describe "Puppet defaults" do
subject { Puppet.settings[:reporturl] }
it { should == "http://localhost:3000/reports" }
end
+
+ describe "when configuring color" do
+ it "should default to ansi", :unless => Puppet.features.microsoft_windows? do
+ Puppet.settings[:color].should == 'ansi'
+ end
+
+ it "should default to false", :if => Puppet.features.microsoft_windows? do
+ Puppet.settings[:color].should == 'false'
+ end
+ end
end