Sha256: 875a7f6f0690d14da2ebf439e7c6bbab327ada3b0077583666ed7d4a2658ffd8
Contents?: true
Size: 923 Bytes
Versions: 1
Compression:
Stored size: 923 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' require 'cucumber/formatters/ansicolor' module Cucumber module Formatters describe ANSIColor do include ANSIColor before do ::Term::ANSIColor.coloring = true end after do ::Term::ANSIColor.coloring = false end it "should wrap string in bold green for #passed with string arg" do passed("foo").should == "\e[0m\e[1m\e[32mfoo\e[0m\e[0m" end it "should return bold green without wrapping for #passed without arg" do passed.should == "\e[0m\e[1m\e[32m" end it "should return grey for #comment" do comment("foo").should == "\e[0m\e[90mfoo\e[0m" end it "should not generate ansi codes when colors are disabled" do ENV['CUCUMBER_COLORS_DISABLED'] = '1' passed("foo").should == "foo" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elight-cucumber-0.1.9 | spec/cucumber/formatters/ansicolor_spec.rb |