Frederick Cheung wrote in post #1020639:
> On Sep 7, 2:55pm, Heinz Strunk <[email protected]> wrote:
> tests run inside a transaction so (by default at least) you can't see
> what's in the test database from outside the test. Probably worth
> sticking a breakpoint in there so that you can poke around at the
> state of the database and check exactly what's going on (e.g. is that
> validation error actually coming from the country model or is it
> coming from the currency ?)
>
> Fred

Hey Fred,

I tried that already and database was empty the whole time. I put the 
debugger right before the Factory and followed every step but nothing 
and then still the message appears.

What I found out though is when I turned of transactional fixtures with
config.use_transactional_fixtures = false
I found 2 entries in the currencies table:
Currency 1
Currency 1
which has obviously validate uniqueness turned off.

and in the countries table:
Country 1

and then the error so for some reason it must try to create a second 
"Country 1" which fails then but I just don't know why twice.

-- 
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