search for: mymodeltest

Displaying 2 results from an estimated 2 matches for "mymodeltest".

Did you mean: modeltest
2006 Jul 29
1
Anything wrong with this test? Cannot access fixture
Hi, I have problem accessing the testfixture. The values from the YML-Fixture-File are correctly written into database, but accessing the fixture is impossible. It is always nil. Is anything wrong with this test? class MyModelTest < Test::Unit::TestCase fixtures :my_model def test_simple a = MyModel.find(@my_model["first"].id) # Accessing @my_model is impossible ... end end Thanks, Steffen -- Posted via http://www.ruby-forum.com/.
2007 May 01
7
Unit testing and stale ActiveRecords
I''m having real trouble unit testing my Rails ActiveRecord models. It seems like more than half the time the data is stale. All I have to do is reference a variable and it suddenly the test will start passing. I''m not using the yml fixtures much because much of the behavior in my models deals with the relationships they have with other model objects and the yml fixtures