diff --git a/spec/the_moderator/model_spec.rb b/spec/the_moderator/model_spec.rb index 01aeb64..a4fc44e 100644 --- a/spec/the_moderator/model_spec.rb +++ b/spec/the_moderator/model_spec.rb @@ -6,7 +6,7 @@ describe TheModerator::Model do page = Page.new(name: 'Name', content: 'Content') page.moderate(:name) - expect(page.moderations).to have(1).moderation + expect(page.moderations.size).to eq(1) expect(page.moderations.first.data[:attributes]).to include(name: 'Name') expect(page.name).to be_nil expect(page.content).to eq('Content') @@ -21,7 +21,7 @@ describe TheModerator::Model do name: 'name', content: 'content', id: category.page.id}} category.moderate(page: :name) - expect(category.moderations).to have(1).moderation + expect(category.moderations.size).to eq(1) expect(category.moderations.first.data[:attributes]) .to include(page_attributes: {name: 'name', id: category.page.id}) expect(category.page.name).to be_nil @@ -35,7 +35,7 @@ describe TheModerator::Model do page.attributes = {links_attributes: [{id: link.id, name: 'link'}]} page.moderate(links: [:name]) - expect(page.moderations).to have(1).moderation + expect(page.moderations.size).to eq(1) expect(page.moderations.first.data[:attributes]) .to include(links_attributes: {link.id => {name: 'link', id: link.id}}) expect(link.name).to be_nil @@ -47,8 +47,8 @@ describe TheModerator::Model do page = Page.new(name: 'Name', content: 'Content') page.moderate(:name) - expect(page.moderated?(:name)).to be_true - expect(page.moderated?(:content)).to be_false + expect(page.moderated?(:name)).to be true + expect(page.moderated?(:content)).to be false end end end diff --git a/spec/the_moderator/moderation_model_spec.rb b/spec/the_moderator/moderation_model_spec.rb index 167d9de..304872f 100644 --- a/spec/the_moderator/moderation_model_spec.rb +++ b/spec/the_moderator/moderation_model_spec.rb @@ -15,7 +15,7 @@ describe TheModerator::ModerationModel do subject.accept expect(subject.moderatable.name).to eq('Name') - expect(subject.destroyed?).to be_true + expect(subject.destroyed?).to be true end end @@ -25,7 +25,7 @@ describe TheModerator::ModerationModel do subject.discard expect(subject.moderatable.name).to be_nil - expect(subject.destroyed?).to be_true + expect(subject.destroyed?).to be true end end @@ -34,15 +34,15 @@ describe TheModerator::ModerationModel do expect(subject.moderatable.name).to be_nil preview = subject.preview - expect(preview.frozen?).to be_true + expect(preview.frozen?).to be true expect(preview.name).to eq('Name') end end describe '#include?' do it 'includes name' do - expect(subject.include?(:name)).to be_true - expect(subject.include?(:content)).to be_false + expect(subject.include?(:name)).to be true + expect(subject.include?(:content)).to be false end end end