Sha256: 03ad694718b732f3cafc0c9fc3fdce57b3a4e5705e51465bf1e5a771fb4390df
Contents?: true
Size: 819 Bytes
Versions: 2
Compression:
Stored size: 819 Bytes
Contents
# encoding: utf-8 require "spec_helper" describe Teaspoon::Formatters::SnowdayFormatter do let(:passing_spec) { double(passing?: true) } let(:pending_spec) { double(passing?: false, pending?: true) } let(:failing_spec) { double(passing?: false, pending?: false) } before do @log = "" allow(STDOUT).to receive(:print) { |s| @log << s } end describe "#spec" do it "logs a snowy snowman on passing results" do subject.spec(passing_spec) expect(@log).to eq("\e[36m☃\e[0m") end it "logs a yellow sadface on pending results" do subject.spec(pending_spec) expect(@log).to eq("\e[33m☹\e[0m") end it "logs a red skull and crossbones on failing results" do subject.spec(failing_spec) expect(@log).to eq("\e[31m☠\e[0m") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
teaspoon-0.9.1 | spec/teaspoon/formatters/snowday_formatter_spec.rb |
teaspoon-0.9.0 | spec/teaspoon/formatters/snowday_formatter_spec.rb |