ruby on rails - Using namespaced models in association in fixtures -
in rails 4.1 app have model called teacher , model called student. each student belongs_to single teacher.
let's few days later have 100 more models, decide cleaning via namespaces. put teacher , student models inside folder named human. put classes inside modules, it's human::teacher , human::student. great! can open rails console , play around models before. (no changes in db.)
but sure, run tests...
i have following fixture files haven't touched yet:
# teachers.yml english_teacher: name: john doe spanish_teacher: name: juan pueblo # students.yml only_student: name: annie teacher: english_teacher i run tests:
table students has no column named teacher but of course not, it's teacher_id , fixtures supposed know that. right?
i guess if put fixture files under test/fixtures/human folder, should work?
Comments
Post a Comment