Hi all,
I''m having error on all unit test. Even this one:
hash = { :title => "recipe title",
:description => "recipe description",
:serving => 1,
:directions => "do it"
}
recipe_expected = Recipe.new(hash)
recipe_should_be_equal = Recipe.new(hash)
assert_equal(recipe_expected, recipe_should_be_equal)
And this is the error i get:
test_should_be_equal FAIL
./test/unit/recipe_test.rb:16:in `test_should_be_equal''
<#<Recipe id: nil, title: "recipe title", serving: 1,
description:
"recipe description", directions: "do it", created_at: nil,
updated_at:
nil>> expected but was
<#<Recipe id: nil, title: "recipe title", serving: 1,
description:
"recipe description", directions: "do it", created_at: nil,
updated_at:
nil>>.
As far as i can see, the object is the same. I''m wondering why this is
happening.
Thanks,
Dida
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---