test/unit/test_key.rb in djsun-mongo_mapper-0.5.0.1 vs test/unit/test_key.rb in djsun-mongo_mapper-0.5.2.1

- old
+ new

@@ -89,9 +89,18 @@ end should "know if it is not a embedded_document" do Key.new(:name, String).embeddable?.should be_false end + + should "know if it is a number" do + Key.new(:age, Integer).number?.should be_true + Key.new(:age, Float).number?.should be_true + end + + should "know if it is not a number" do + Key.new(:age, String).number?.should be_false + end end context "setting a value with a custom type" do should "correctly typecast" do key = Key.new(:foo, FooType)