Sha256: db837c5cbb059f00ec82eeafc370ca44fde1c0c4f5a5dbbef24d5d363052c78f
Contents?: true
Size: 683 Bytes
Versions: 125
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true RSpec.describe :excerpt do link :excerpt, from: :ree_text it { expect(excerpt("This is an example", "an", radius: 5)).to eq("...s is an exam...") expect(excerpt('This is an example', 'is', radius: 5)).to eq("This is a...") expect(excerpt('This is an example', 'is')).to eq("This is an example") expect(excerpt('This next thing is an example', 'ex', radius: 2)).to eq("...next...") expect(excerpt('This is also an example', 'an', radius: 8, omission: '<chop> ')).to eq("<chop> is also an example") expect(excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1)).to eq("...a very beautiful...") } end
Version data entries
125 entries across 125 versions & 1 rubygems