I am a newbie with BDD.
I am trying to use RSpec with some legacy tables and I use the
set_table_name method in the models.
The name of the table and the class doesnÂ´t match.
It seems that there is no problem to load the fixture in Test::Unit, I
will use the method set_fixture_class before loading fixtures, and I
will get to the data in the fixture without problems.
But this doesnÂ´t seem to work in RSpec.
Anybody knows how to use it?
This is a sample of the code
set_table_name = tbl_people
the fixture file (tbl_people.yml)
and the spec file (person_spec.rb)
describe Person, “in general” do
set_fixture_class :tbl_people => Person
@a_person = tbl_people(:one)
it “” do
Fixture data is loaded in the test database, I can get to it with a find
method, but I canÂ´t get to it directly through the fixture method.