Sha256: 7c788735a5a20de7d8e8c822650d83732a2a68ec4fcbd7f59b58ef979b1b2cfd

Contents?: true

Size: 619 Bytes

Versions: 26

Compression:

Stored size: 619 Bytes

Contents

require 'xcpretty/term'

module XCPretty
  describe Term do
    it "marks unicode as unavailable" do
      Encoding.stub(:default_external).and_return(Encoding::ASCII)
      Term.unicode?.should be false
    end

    it "marks unicode as available" do
      Encoding.stub(:default_external).and_return(Encoding::UTF_8)
      Term.unicode?.should be true
    end

    it 'marks color as unavailable' do
      STDOUT.stub(:tty?).and_return(false)
      Term.color?.should be false
    end

    it 'marks color as available' do
      STDOUT.stub(:tty?).and_return(true)
      Term.color?.should be true
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
xcpretty-0.4.0 spec/xcpretty/term_spec.rb
xcpretty-security-patched-0.3.2 spec/xcpretty/term_spec.rb
xcpretty-security-patched-0.3.0 spec/xcpretty/term_spec.rb
xcpretty-0.3.0 spec/xcpretty/term_spec.rb
xcpretty-0.2.8 spec/xcpretty/term_spec.rb
xcpretty-0.2.7 spec/xcpretty/term_spec.rb
xcpretty-0.2.6 spec/xcpretty/term_spec.rb
xcpretty-0.2.4 spec/xcpretty/term_spec.rb
xcpretty-0.2.3 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb14 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb13 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb12 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb11 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb10 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb9 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb8 spec/xcpretty/term_spec.rb
xcpretty-0.2.2 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb7 spec/xcpretty/term_spec.rb
xcpretty-0.2.1 spec/xcpretty/term_spec.rb
xcpretty-bb-0.1.12.bb6 spec/xcpretty/term_spec.rb