Forum: Ruby on Rails Setting the table name for the test units

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
04d68ccef5e8e0d9516acdbe072b47ef?d=identicon&s=25 P. Pantouffe (pantouffe)
on 2007-01-30 09:21
  I have a model where  model name-table name relation doesn't follow
the pluralize rule. I'm setting my real table name in the model with
set_table_name function.
  I importend the structure form the _development database to the _test
one with rake clone_structure_to_test.
  For the model above i'm writing a test unit which raises an error. It
tries to delete the records from the table wich resides in the _test
database, but it searches for the table with the name pluralized, wich
of course does not exist.
  How cand i bound the test to the models setting regarding the table
04d68ccef5e8e0d9516acdbe072b47ef?d=identicon&s=25 P. Pantouffe (pantouffe)
on 2007-01-30 09:30
if I rename the name of the table_plural.yml to the table_real.yml
everythig works ok and also the fixtures :table_plural to fixtures
:table_real everything works ok.
This topic is locked and can not be replied to.