Sha256: f6b7cae7a5a11de335a45c302d72cbd1182fefb67b1d5c7e54a62353cc647801
Contents?: true
Size: 669 Bytes
Versions: 13
Compression:
Stored size: 669 Bytes
Contents
describe MotionPrime::Model do before do MotionPrime::Store.connect @store = MotionPrime::Store.shared_store end after do @store.clear end describe "has_changed?" do before do @user = stub_user("Bob", 10, Time.now) @user.save end it "should be false after save" do @user.has_changed?.should.be.false end it "should be true after attribute change" do @user.name = "Smith" @user.has_changed?.should.be.true end it "should be false after reload" do @user.name = "Smith" @user.reload @user.has_changed?.should.be.false @user.name.should == "Bob" end end end
Version data entries
13 entries across 13 versions & 1 rubygems