spec/memento/state_spec.rb in memento-0.3.0 vs spec/memento/state_spec.rb in memento-0.3.1
- old
+ new
@@ -11,24 +11,24 @@
it "should belong to session" do
Memento::State.new(:session => @session).session.should eql(@session)
end
it "should require session" do
- Memento::State.create.errors[:session].should eql("can't be blank")
+ Memento::State.create.errors[:session].should eql(["can't be blank"])
end
it "should require action_type to be one of Memento::State::RECORD_CAUSES" do
- Memento::State.create.errors[:action_type].should eql("can't be blank")
- Memento::State.create(:action_type => "move").errors[:action_type].should eql("is not included in the list")
+ Memento::State.create.errors[:action_type].should eql(["can't be blank"])
+ Memento::State.create(:action_type => "move").errors[:action_type].should eql(["is not included in the list"])
end
it "should belong to polymorphic record" do
Memento::State.new(:record => @user).record.should eql(@user)
Memento::State.new(:record => @session).record.should eql(@session)
end
it "should require record" do
- Memento::State.create.errors[:record].should eql("can't be blank")
+ Memento::State.create.errors[:record].should eql(["can't be blank"])
end
describe "valid State" do
before do
\ No newline at end of file