spec/memento/state_spec.rb in memento-0.4.3 vs spec/memento/state_spec.rb in memento-0.5.0

- old
+ new

@@ -30,11 +30,12 @@ Memento::State.create.errors[:record].should eql(["can't be blank"]) end describe "valid State" do before do - @state = @session.states.create!({:action_type => "destroy", :record => @project = Project.create(:name => "A")} ) + @state = @session.states.store("destroy", @project = Project.create(:name => "A")) + @project.destroy end it "should give back Memento::Result on undo" do result = @state.undo result.should be_a(Memento::Result) @@ -49,6 +50,6 @@ after do shutdown_db end -end \ No newline at end of file +end