spec/models/landable/template_spec.rb in landable-1.13.1 vs spec/models/landable/template_spec.rb in landable-1.13.2

- old
+ new

@@ -15,21 +15,21 @@ describe '#name=' do context 'without a slug' do it 'should assign a slug' do template = build(:template, slug: nil) template.name = 'Six Seven' - template.name.should == 'Six Seven' - template.slug.should == 'six_seven' + template.name.should eq 'Six Seven' + template.slug.should eq 'six_seven' end end context 'with a slug' do it 'should leave the slug alone' do template = build(:template, slug: 'six') template.name = 'seven' - template.name.should == 'seven' - template.slug.should == 'six' + template.name.should eq 'seven' + template.slug.should eq 'six' end end end describe '#partial?' do @@ -47,25 +47,25 @@ describe '#publish' do let(:template) { FactoryGirl.create :template } let(:author) { FactoryGirl.create :author } it 'should create a template_revision' do - expect {template.publish!(author: author)}.to change{template.revisions.count}.from(0).to(1) + expect { template.publish!(author: author) }.to change { template.revisions.count }.from(0).to(1) end it 'should have the provided author' do template.publish! author: author revision = template.revisions.last - revision.author.should == author + revision.author.should eq author end it 'should update the published_revision_id' do template.publish! author: author revision = template.revisions.last - template.published_revision.should == revision + template.published_revision.should eq revision end it 'should unset previous revision.is_published' do template.publish! author: author revision1 = template.published_revision @@ -95,11 +95,11 @@ template.name = 'Foo' template.publish! author: author template.revert_to! revision - template.published_revision.id.should_not == revision.id + template.published_revision.id.should_not eq revision.id end it 'should copy revision attributes into the page model' do template.name = 'Bar' template.publish! author: author @@ -124,19 +124,19 @@ it 'should not allow a slug with out underscores' do t = build :template, slug: 'I have no space' t.name = 'No Space' t.save! - t.slug.should_not == 'I have no space' - t.slug.should == 'i_have_no_space' + t.slug.should_not eq 'I have no space' + t.slug.should eq 'i_have_no_space' end it 'should allow the name to set the slug' do t = build :template, slug: nil t.name = 'I have no space' t.save! - t.slug.should == 'i_have_no_space' + t.slug.should eq 'i_have_no_space' end end end end