"interning empty string" error in test setup

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:increate_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:increate_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:increate_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:insetup’

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

On Apr 5, 9:20 am, andy [email protected] 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

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 C. [email protected]

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