Sha256: 9bfe0f0509885404421730015a7eb7acb7a69c61cea187d8a3645c4862e0a9be

Contents?: true

Size: 254 Bytes

Versions: 6

Compression:

Stored size: 254 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Strings, '#truncate' do
  it "truncates text" do
    text = 'ラドクリフ、マラソン五輪代表に1万m出場にも含み'
    expect(Strings.truncate(text, 12)).to eq('ラドクリフ…')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
strings-0.1.8 spec/unit/truncate_spec.rb
strings-0.1.7 spec/unit/truncate_spec.rb
strings-0.1.6 spec/unit/truncate_spec.rb
strings-0.1.5 spec/unit/truncate_spec.rb
strings-0.1.4 spec/unit/truncate_spec.rb
strings-0.1.3 spec/unit/truncate_spec.rb