test/unit/test_keys.rb in mongo_mapper-0.9.2 vs test/unit/test_keys.rb in mongo_mapper-0.10.0
- old
+ new
@@ -12,31 +12,9 @@
silence_stderr { klass.new.id.should be_nil }
}.should_not raise_error
end
end
- context ".new with no id and _id of type string" do
- should "not error" do
- lambda {
- klass = Doc() do
- key :_id, String
- end
- silence_stderr { klass.new.id.should_not be_nil }
- }.should_not raise_error
- end
- end
-
- context ".new with no id and _id of type object id" do
- should "not error" do
- lambda {
- klass = Doc() do
- key :_id, ObjectId
- end
- silence_stderr { klass.new.should_not be_nil }
- }.should_not raise_error
- end
- end
-
context ".key?(:symbol)" do
should "be true if document has key" do
Address.key?(:city).should be_true
end