Sha256: 14968da4531f3db61ffcff26c3d70f2a1c4644944b7fb748632afb0f6f0d098b

Contents?: true

Size: 309 Bytes

Versions: 97

Compression:

Stored size: 309 Bytes

Contents

require 'spec_helper'
require 'rainbow'

RSpec.describe 'uncolor method' do

  it 'strips ansi color escape code' do
    expect(Rainbow.uncolor("\e[35mhello\e[0mm")).to eq 'hellom'
  end

  it 'does not strip scroll down escape code' do
    expect(Rainbow.uncolor("\e[1Thello")).to eq "\e[1Thello"
  end

end

Version data entries

97 entries across 90 versions & 19 rubygems

Version Path
ory-kratos-client-0.7.5.alpha2 vendor/bundle/ruby/2.5.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
mx-platform-ruby-0.4.0 vendor/bundle/ruby/2.6.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
mx-platform-ruby-0.3.2 vendor/bundle/ruby/2.6.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
mx-platform-ruby-0.3.1 vendor/bundle/ruby/2.6.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.3.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
cocRb-0.1.0 .bundle/ruby/3.0.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
mfk_openapi_ruby_client-1.0.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.2.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.1.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.0.3 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.0.2 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.0.1 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
passbase-1.0.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
talon_one-2.0.0 vendor/bundle/ruby/2.3.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
talon_one-2.0.0 vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.6.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/rainbow-3.0.0/spec/integration/uncolor_spec.rb