Sha256: 4412b80a22ad8f24847736bb34867b4b1b854d7232122372a2b559a9f1afed21
Contents?: true
Size: 1.1 KB
Versions: 10
Compression:
Stored size: 1.1 KB
Contents
# -*- coding: utf-8 -*- require_relative '../spec_helper' describe ConsadoleAggregator::Helper do describe :concatenate do context 'with argument 140 chars' do subject { ConsadoleAggregator::Helper.concat('い' * 140) } it { should have(140).item } it { should == 'い' * 140 } end context 'with argument 140 chars and 18 chars url' do subject { ConsadoleAggregator::Helper.concat('ろ' * 140, url:'http://example.jp/') } it { should have(140).item } it { should be_end_with 'ろ... http://example.jp/' } end context 'with argument 140 chars and 10 chars hashtag' do subject { ConsadoleAggregator::Helper.concat('は' * 140, hashtag:'#consadole') } it { should have(140).item } it { should be_end_with 'は... #consadole' } end context 'with argument 140 chars and 18 chars url and 10 chars hashtag' do subject { ConsadoleAggregator::Helper.concat('に' * 140, url:'http://example.jp/', hashtag:'#consadole') } it { should have(140).item } it { should be_end_with 'に... http://example.jp/ #consadole' } end end end
Version data entries
10 entries across 10 versions & 1 rubygems