Sha256: a1aae8c09a19a9d9c3360888c4c1aa4c8cde978a33704598bee04372ae53353f

Contents?: true

Size: 808 Bytes

Versions: 27

Compression:

Stored size: 808 Bytes

Contents

require 'spec_helper'
require 'cucumber/formatter/ansicolor'

module Cucumber
  module Formatter
    describe ANSIColor do
      include ANSIColor

      it "should wrap passed_param with bold green and reset to green" do
        passed_param("foo").should == "\e[32m\e[1mfoo\e[0m\e[0m\e[32m"
      end

      it "should wrap passed in green" do
        passed("foo").should == "\e[32mfoo\e[0m"
      end

      it "should not reset passed if there are no arguments" do
        passed.should == "\e[32m"
      end

      it "should wrap comments in grey" do
        comment("foo").should == "\e[90mfoo\e[0m"
      end

      it "should not generate ansi codes when colors are disabled" do
        ::Cucumber::Term::ANSIColor.coloring = false
        passed("foo").should == "foo"
      end
    end
  end
end

Version data entries

27 entries across 25 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/spec/cucumber/formatter/ansicolor_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/spec/cucumber/formatter/ansicolor_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.20 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.19 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.18 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.17 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.16 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.15 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.14 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.13 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.12 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.11 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.10 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.9 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.8 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.7 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.6 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.5 spec/cucumber/formatter/ansicolor_spec.rb
cucumber-1.3.4 spec/cucumber/formatter/ansicolor_spec.rb