Sha256: 91e82ede91496b62e228d527f81af7169314d3cac4fb35eec9ecfa112435d3a7

Contents?: true

Size: 524 Bytes

Versions: 14

Compression:

Stored size: 524 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'spec_helper'

describe LinkThumbnailer::Model do

  let(:instance) { described_class.new }

  describe '#sanitize' do

    let(:str)     { "foo\r\n" }
    let(:result)  { "foo" }
    let(:action)  { instance.send(:sanitize, str) }

    it { expect(action).to eq(result) }

    context "when string includes utf-8 characters" do
      let(:str) { "中文" }

      it "should keeps those characters" do
        expect(instance.send(:sanitize, str)).to eq(str)
      end
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
link_thumbnailer-3.3.1 spec/model_spec.rb
link_thumbnailer-3.3.0 spec/model_spec.rb
link_thumbnailer-3.2.1 spec/model_spec.rb
link_thumbnailer-3.2.0 spec/model_spec.rb
link_thumbnailer-3.1.2 spec/model_spec.rb
link_thumbnailer-3.1.1 spec/model_spec.rb
link_thumbnailer-3.1.0 spec/model_spec.rb
link_thumbnailer-3.0.3 spec/model_spec.rb
link_thumbnailer-3.0.2 spec/model_spec.rb
link_thumbnailer-3.0.1 spec/model_spec.rb
link_thumbnailer-3.0.0 spec/model_spec.rb
link_thumbnailer-2.6.1 spec/model_spec.rb
link_thumbnailer-2.6.0 spec/model_spec.rb
link_thumbnailer-2.5.2 spec/model_spec.rb