test/functional/test_protected.rb in mongo_mapper-0.7.3 vs test/functional/test_protected.rb in mongo_mapper-0.7.4

- old
+ new

@@ -67,9 +67,13 @@ should 'be indifferent to whether the protected keys are strings or symbols' do @doc.update_attributes!("name" => 'Stimpson J. Cat', "admin" => true) @doc.name.should == 'Stimpson J. Cat' @doc.admin.should be_false end + + should "accept nil as constructor's argument without raising exception" do + lambda { @doc_class.new(nil) }.should_not raise_error + end end context "Single collection inherited protected attributes" do setup do class ::GrandParent