require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Thor::Shell::HTML do def shell @shell ||= Thor::Shell::HTML.new end describe "#say" do it "set the color if specified" do $stdout.should_receive(:puts).with('Wow! Now we have colors!') shell.say "Wow! Now we have colors!", :green end it "does not use a new line even with colors" do $stdout.should_receive(:print).with('Wow! Now we have colors! ') shell.say "Wow! Now we have colors! ", :green end end describe "#say_status" do it "uses color to say status" do $stdout.should_receive(:puts).with(' conflict README') shell.say_status :conflict, "README", :red end end end