On running unit tests with a setup method, I''m suddenly getting ArgumentError: interning empty string C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:251:in `to_sym'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:251:in `create_fixtures'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:250:in `map'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:250:in `create_fixtures'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/base.rb :867:in `silence'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:248:in `create_fixtures'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:593:in `load_fixtures'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/ active_record/fixture s.rb:547:in `setup'' From looking at fixtures.rb it looks like [""] is being passed as the table_names argument to Fixtures#create_fixtures. Can anyone help me figure out why this started happening and how to fix it? All was well and tests were passing; I then started fiddling with some data migrations in the test db and this error started happening. Incidentally part of my fiddling included accidentally rolling back some migrations on the development db, which I aborted for fear of losing some useful data; don''t know if that''s related. Thanks, Andy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Apr 5, 9:20 am, andy <aegg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On running unit tests with a setup method, I''m suddenly getting >Could it be the case that you are calling the fixtures method with no arguments ? (probably not on purpose, but it''s the sort of mistake that''s easily done) Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, Fred. Yeah, the weird thing is that I actually don''t call the fixtures method in any of the tests I''m running. It appears that the fixtures code gets called as part of the setup process. I am finding it very hard to debug because of the way test/unit orders the test cases it runs. The error happens with some combinations of tests and not others, and I haven''t yet been able to isolate what exactly sets it off. On Apr 5, 3:19 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 5, 9:20 am, andy <aegg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On running unit tests with a setup method, I''m suddenly getting > > Could it be the case that you are calling the fixtures method with no > arguments ? (probably not on purpose, but it''s the sort of mistake > that''s easily done) > > Fred--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 6 Apr 2008, at 15:54, andy wrote:> > Thanks, Fred. Yeah, the weird thing is that I actually don''t call the > fixtures method in any of the tests I''m running. It appears that the > fixtures code gets called as part of the setup process. >Looks like a tricky one. I''d stick a debugger breakpoint at the line that causes things to fall over (you can make it conditional: debugger if foo || bar) then walk up the stack until you find the culprit. Fred> I am finding it very hard to debug because of the way test/unit orders > the test cases it runs. The error happens with some combinations of > tests and not others, and I haven''t yet been able to isolate what > exactly sets it off. > > > On Apr 5, 3:19 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On Apr 5, 9:20 am, andy <aegg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> On running unit tests with a setup method, I''m suddenly getting >> >> Could it be the case that you are calling the fixtures method with no >> arguments ? (probably not on purpose, but it''s the sort of mistake >> that''s easily done) >> >> Fred > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---