I was reading this page: http://api.rubyonrails.org/classes/Fixtures.html#M000326 and was trying to get hashed labels working. However, calling it from within a unit test results in this error: def test_defaults_to_disabled identify(''one'') end 2) Error: test_defaults_to_disabled(AdminTest): NoMethodError: undefined method `identify'' for #<AdminTest:0x7f9f493e5248> /test/unit/admin_test.rb:45:in `test_defaults_to_disabled'' So, how is one supposed to properly call label()? -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks" -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
On Nov 20, 3:55 pm, "Todd A. Jacobs" <tjacobs-sndr- b4f...-S/bPM5e9wgfNLxjTenLetw@public.gmane.org> wrote:> I was reading this page: > > http://api.rubyonrails.org/classes/Fixtures.html#M000326 > > and was trying to get hashed labels working. However, calling it from > within a unit test results in this error: > > def test_defaults_to_disabled > identify(''one'') > end >It''s a class method on the Fixtures class, so Fixtures.identify ''one'' Fred> 2) Error: > test_defaults_to_disabled(AdminTest): > NoMethodError: undefined method `identify'' for > #<AdminTest:0x7f9f493e5248> > /test/unit/admin_test.rb:45:in `test_defaults_to_disabled'' > > So, how is one supposed to properly call label()? > > -- > "Oh, look: rocks!" > -- Doctor Who, "Destiny of the Daleks"-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
On Fri, Nov 20, 2009 at 08:33:01AM -0800, Frederick Cheung wrote:> It''s a class method on the Fixtures class, so Fixtures.identify ''one''I''m running 2.3.4, and with this: def test_defaults_to_disabled puts "Fix: " << Fixtures.indentify(''one'') end I''m still getting: test_defaults_to_disabled(AdminTest): NoMethodError: undefined method `indentify'' for Fixtures:Class /test/unit/admin_test.rb:40:in `test_defaults_to_disabled'' Is the API incorrect, or is there something else going on here? -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks" -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
On Fri, Nov 20, 2009 at 1:54 PM, Todd A. Jacobs <tjacobs-sndr-b4faac-S/bPM5e9wgfNLxjTenLetw@public.gmane.org> wrote:>> It''s a class method on the Fixtures class, so Fixtures.identify ''one''> test_defaults_to_disabled(AdminTest): > NoMethodError: undefined method `indentify'' for Fixtures:Class > /test/unit/admin_test.rb:40:in `test_defaults_to_disabled'' > > Is the API incorrect, or is there something else going on here?"indentify" vs "identify" ? :-) I think "indentify" is what happens to your fender when someone hits your car with theirs... -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.