Sha256: b6306da870c9d3575348de067c1cf14e0d692a4592031b59862818386d9c8548
Contents?: true
Size: 757 Bytes
Versions: 7
Compression:
Stored size: 757 Bytes
Contents
require File.join(File.dirname(__FILE__), "/../../../spec_helper.rb") describe Mongoid::Associations::HasOneAssociation do before do @attributes = { :mixed_drink => { :name => "Jack and Coke" } } @document = stub(:attributes => @attributes) end describe "#decorate!" do before do @association = Mongoid::Associations::HasOneAssociation.new(:mixed_drink, @document) end context "when getting values" do it "delegates to the document" do @association.name.should == "Jack and Coke" end end context "when setting values" do it "delegates to the document" do @association.name = "Jack and Coke" @association.name.should == "Jack and Coke" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems