Sha256: b12d2f9e537c5e74c6bbe8be53f3b55fb55aaccdf7c7a06a2051ab07ab02c694

Contents?: true

Size: 522 Bytes

Versions: 17

Compression:

Stored size: 522 Bytes

Contents

require 'test_helper'
require 'ansi/code'

testcase ANSI::Code do

  unit :red do
    str = ANSI::Code.red
    out = "\e[31m"
    out.assert == str
  end

  unit :red => "with block notation" do
    str = ANSI::Code.red { "Hello" }
    out = "\e[31mHello\e[0m"
    out.assert == str
  end

  unit :blue do
    str = ANSI::Code.blue
    out = "\e[34m"
    out.assert == str
  end

  unit :blue => "with block notation" do
    str = ANSI::Code.blue { "World" }
    out = "\e[34mWorld\e[0m"
    out.assert == str
  end

end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-1.0.0 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
swipe-rails-0.0.5 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-1.0.0.beta3 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-1.0.0.beta2 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-1.0.0.beta vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-0.9.1.beta.3 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-0.9.1.beta vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-0.9.0 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
challah-0.8.3 vendor/bundle/gems/ansi-1.4.3/test/case_ansicode.rb
ansi-1.4.3 test/case_ansicode.rb
challah-0.6.1 vendor/bundle/gems/ansi-1.4.2/test/case_ansicode.rb
challah-0.6.0 vendor/bundle/gems/ansi-1.4.2/test/case_ansicode.rb
ansi-1.4.2 test/case_ansicode.rb
ansi-1.4.1 test/case_ansicode.rb
ansi-1.4.0 test/case_ansicode.rb