hi all, I''m trying to create tests for my app but "rake test:units" doesn''t create one table, even if other ware created properly. Migration file for this table is present, but if I create this table from finger and run test just for it everything it''s ok. I can''t find any explanation for this, mayby someone knows what''s going on. -- 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 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?hl=en -~----------~----~----~----~------~----~------~--~---
I had an issue like this one time. What was more troubling was that I could rake db:fixtures load... FIXTURES=my_table and then run an individual test against that model and it worked correctly. In my case the issue was related to using a :decimal column. At any rate, you could see the root of the problem by opening / databases/schema.rb. The table that was not created in the test db was commented out in schema.rb with an additional comment about the ARec failure. HTH, AndyV On Jan 25, 8:11 am, Marcin Kulisz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi all, > I''m trying to create tests for my app but "rake test:units" doesn''t > create one table, even if other ware created properly. Migration file > for this table is present, but if I create this table from finger and > run test just for it everything it''s ok. > I can''t find any explanation for this, mayby someone knows what''s going > on. > -- > Posted viahttp://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 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?hl=en -~----------~----~----~----~------~----~------~--~---
AndyV wrote: ...> At any rate, you could see the root of the problem by opening / > databases/schema.rb. The table that was not created in the test db > was commented out in schema.rb with an additional comment about the > ARec failure.You''re right and thx for the help, but there''s one very strange think, I''ve got column declaration like this:>> t.column :data_ur, :yearand I hadn''t any problems with migration, when I look in to DB declaration is:>> | data_ur | year(4) | YES | | NULL | |and ruby in schema.rb is shouting this:>> # Could not dump table "mtp_records" because of following StandardError >> # Unknown type ''year(4)'' for column ''data_ur''Thus the question is how this problem can be solved without changeing datatype, because I''ve got only year for inserting not whole date datatype? -- 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 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?hl=en -~----------~----~----~----~------~----~------~--~---