Hi all, Ruby 1.8.5 Rails 1.1.6 I have a dilemma. For some of my tables I want to use the fixture data as the initial set of data for that table. This was easy enough using the migrations helper, but I discovered a problem - I had to remove the hard coded id values because it was causing confusion with regards to the autogenerated sequence value (PostgreSQL) for the id column. Ok, no problem, remove the hard coded id values and all is well. Except that now I get "Couldn''t find MyModel without an ID" when I try to run the unit tests. My test case is pretty basic: class MyModelTest < Test::Unit::TestCase fixtures :mymodel def setup @mymodel = MyModel.find(1) end # run some standard tests. end Why do I need to hard code the ID value in the fixture in order to get the tests to work? In development this works without issue - the database just assigns sequence.nextval as the ID for the next inserted record. What should I do? Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---