core: color success Ui green
This commit is contained in:
parent
09955be2cd
commit
00530303fb
|
@ -277,6 +277,7 @@ module Vagrant
|
|||
|
||||
# Special case some colors for certain message types
|
||||
opts[:color] = :red if type == :error
|
||||
opts[:color] = :green if type == :success
|
||||
opts[:color] = :yellow if type == :warn
|
||||
|
||||
# If there is no color specified, exit early
|
||||
|
|
|
@ -130,6 +130,17 @@ describe Vagrant::UI::Colored do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#success" do
|
||||
it "colors green" do
|
||||
subject.should_receive(:safe_puts).with do |message, *args|
|
||||
expect(message).to start_with("\033[0;32m")
|
||||
expect(message).to end_with("\033[0m")
|
||||
end
|
||||
|
||||
subject.success("foo")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#warn" do
|
||||
it "colors yellow" do
|
||||
subject.should_receive(:safe_puts).with do |message, *args|
|
||||
|
|
Loading…
Reference in New Issue