Frederick Cheung wrote in post #1035592:
> On Dec 7, 3:00pm, Ori Kremer <[email protected]> wrote:
>> PaymentType loaded before Order is?
>>
> I don't think any specific guarantees are made about when fixtures are
> loaded apart from the fact that by the time your test runs they are
> loaded or about the order in which any of this stuff happens.
>
> Fred

I understand that fixtures are guaranteed to be fully loaded only when
my test runs, the problem is, like you said, that the model class
validation is evaluated before that.

Another approach I tried was not to use fixtures at all, since payment
types are actually seed data and not sample data.
That approach failed as well for the same reason that the model
validation is called from the engine initialization which is done before
the seed data gets populated.

The question remains, how can I use validates inclusion on a lookup
table and not fail the test (when running only integration tests).

Ori

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to