Setahu saya kamu kalo mau compare object apakah mereka attributes-nya
punya value yang sama pake assert_same deh.
assert_equal itu ngetest apakah dia object yang sama.
Please CMIIW.
On Sep 17, 2008, at 8:55 AM, Adinda Praditya wrote:
> Hi all,
>
> Mengapa saya masih dapat error untuk kode testing berikut:
>
> def test_should_be_equal
> 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)
> end
>
>
> Thanks,
>
> Dida
>
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> ID-Ruby
> Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk
> segala varian Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program
> yang dibuat dengan Ruby (Ruby on Rails, JRuby on Rails, Merb)
>
> http://rubyurl.com/Q8DD
> http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
>
> Yahoo! Groups Links
>
>
>
--
http://beol.laksmana.com/
http://www.plurk.com/user/beol