spec/models/voting_spec.rb in neutral-0.0.7 vs spec/models/voting_spec.rb in neutral-0.0.8

- old
+ new

@@ -1,8 +1,8 @@ require 'spec_helper' -describe Neutral::Voting do +describe Neutral::Voting, type: :model do it { should belong_to(:votingable) } let(:voting) { Neutral::Voting.create } let(:nature) { [:positive, :negative].sample } @@ -19,11 +19,11 @@ subject { Neutral::Voting.init(vote) } it { should be_a(Neutral::Voting) } it { should be_persisted } - its(:votingable_type) { should == vote.voteable_type } - its(:votingable_id) { should == vote.voteable_id } + it { expect(subject.votingable_type).to eq vote.voteable_type } + it { expect(subject.votingable_id).to eq vote.voteable_id } it { subject.send(vote.nature).should == 1 } end describe "#add_to_existing" do it "adds vote to an existing voting" do