Sha256: 4de28ca9e13a76fc6fe7ce56861cff9b753a68f98b690bbe79f0b79045d6d20c
Contents?: true
Size: 795 Bytes
Versions: 7
Compression:
Stored size: 795 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe Verse::Truncation, '#new' do let(:text) { 'There go the ships; there is that Leviathan whom thou hast made to play therein.'} it "defaults to no separator and unicode trailing" do truncation = Verse::Truncation.new text expect(truncation.separator).to eq(nil) end it "defaults to unicode trailing" do truncation = Verse::Truncation.new text expect(truncation.trailing).to eq('…') end it "allows to setup global separator value" do truncation = Verse::Truncation.new text, separator: ' ' expect(truncation.separator).to eq(' ') end it "allows to setup global trailing value" do truncation = Verse::Truncation.new text, trailing: '...' expect(truncation.trailing).to eq('...') end end
Version data entries
7 entries across 7 versions & 1 rubygems