Sha256: 4003aba9e42017c9ca18fc695723bdfaf97890e509e9503589143f69257cd45b

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

describe Pipio::Cleaners::TextCleaner, '.clean' do
  it 'removes \r' do
    expect(clean("\r")).to eq('')
  end

  it 'converts & to &' do
    expect(clean('&')).to eq('&')
  end

  it 'converts < to &lt;' do
    expect(clean('<')).to eq('&lt;')
  end

  it 'converts > to &gt;' do
    expect(clean('>')).to eq('&gt;')
  end

  it 'converts " to &quot;' do
    expect(clean('"')).to eq('&quot;')
  end

  it "converts ' to &apos;" do
    expect(clean("'")).to eq('&apos;')
  end

  def clean(line)
    Pipio::Cleaners::TextCleaner.clean(line)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pipio-0.0.2 spec/pipio/cleaners/text_cleaner_spec.rb
pipio-0.0.1 spec/pipio/cleaners/text_cleaner_spec.rb