Sha256: 6aa90683ea0f25632f64708e29eeb601581d2c8672f12e6d22087268a1a2469a
Contents?: true
Size: 659 Bytes
Versions: 21
Compression:
Stored size: 659 Bytes
Contents
require 'torquebox/messaging/datamapper_marshaling' class MyTestDataMapperModel include TorqueBox::Messaging::DataMapper def id ; 100 end end describe TorqueBox::Messaging::DataMapper do describe "DataMapper::Resource" do it "should _dump as a string with the ID and class name" do model = MyTestDataMapperModel.new id, clazz = model._dump(-1).split(':') clazz.should == model.class.name id.should == "100" end it "should call Resource.get with the id on Marshal.load" do MyTestDataMapperModel.should_receive(:get).with("100") Marshal.load(Marshal.dump(MyTestDataMapperModel.new)) end end end
Version data entries
21 entries across 21 versions & 1 rubygems