spec/mongoid/urls_spec.rb in mongoid-urls-0.0.9 vs spec/mongoid/urls_spec.rb in mongoid-urls-0.3.0

- old
+ new

@@ -22,11 +22,11 @@ end describe '#url' do before(:each) { document_class.send(:url, :title) } it 'should slugize a few stuff' do - expect(document.url).to eq('im-a-document') + expect(document.url).to eq('i-m-a-document') end it 'should update url' do document.title = 'I "quoted"' document.valid? @@ -35,11 +35,11 @@ it 'should keep old urls' do article.save article.title = 'Hello Ruby!' article.save - expect(article.urls).to eq ['im-an-article', 'hello-ruby'] + expect(article.urls).to eq ['i-m-an-article', 'hello-ruby'] end end describe '#url' do it 'should accept custom field names' do @@ -124,11 +124,11 @@ expect(article.urls).to be_empty end it 'should create the urls after being saved' do article.save - expect(article.urls).to eq ['im-an-article'] + expect(article.urls).to eq ['i-m-an-article'] end end context 'when the article is not a new record' do it 'should not change the title after being saved' do @@ -173,10 +173,10 @@ end describe '.to_param' do it 'should respond with last valid url' do document_class.send(:url, :title) - expect(document.to_param).to eq 'im-a-document' + expect(document.to_param).to eq 'i-m-a-document' end end describe 'reserved words' do it 'should respect default new' do