Sha256: c05a6da16f97dc79a3a3acbedd6261bae10087ffa48a3a070ba34c06be150f2e

Contents?: true

Size: 277 Bytes

Versions: 3

Compression:

Stored size: 277 Bytes

Contents

require 'spec_helper'
require 'blackbox/string'

describe BB::String do
  describe '.strip_ansi' do
    it "strips a few common escape sequences" do
      have = "\e[31;1mX\e[AY\e[2JZ"
      want = "XYZ"
      expect(BB::String.strip_ansi(have)).to eq(want)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blackbox-1.1.2 spec/string_spec.rb
blackbox-1.1.1 spec/string_spec.rb
blackbox-1.1.0 spec/string_spec.rb