test/unit/test_inspect.rb in mongo_mapper-0.9.1 vs test/unit/test_inspect.rb in mongo_mapper-0.9.2

- old
+ new

@@ -4,16 +4,21 @@ context "#inspect" do setup do @document = Doc('User') do key :name, String key :age, Integer + key :email, String end @doc = @document.new(:name => 'John', :age => 29) end - should "print out attributes in alpha sorted order" do + should "print out non-nil attributes in alpha sorted order" do @doc.inspect.should =~ /_id:.*, age: 29, name: "John"/ + end + + should "print out all attributes when (optional) include_super argument is true" do + @doc.inspect(true).should =~ /_id:.*, age: 29, email: nil, name: "John"/ end should "include class name" do @doc.inspect.should =~ /^#<User/ end \ No newline at end of file