does rails always need to update the development database before running the tests? It seems to insisit on running db:migrate before. Why can''t it just update the test database? This can be annoying if I''m in a production environment and I don''t want a migration to happen until I know the tests pass. How are people dealing with this? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rake db:test:clone? On Jun 27, 2:31 am, anywho <eydai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> does rails always need to update the development database before > running the > tests? It seems to insisit on running db:migrate before. Why can''t it > just update > the test database? This can be annoying if I''m in a production > environment and I > don''t want a migration to happen until I know the tests pass. How are > people > dealing with this?-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
anywho wrote:> does rails always need to update the development database before > running the > tests? It seems to insisit on running db:migrate before. Why can''t it > just update > the test database? This can be annoying if I''m in a production > environment and I > don''t want a migration to happen until I know the tests pass.Your production DB is not the dev DB, so you needn''t migrate it before tests pass You can also just migrate the test DB itself How are> people > dealing with this?-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Jun 27, 2010 at 6:47 AM, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> anywho wrote: >> does rails always need to update the development database before >> running the >> tests? It seems to insisit on running db:migrate before. > > Your production DB is not the dev DB, so you needn''t migrate it before > tests pass You can also just migrate the test DB itselfWhich ignores the original question, rephrased: 1) generate a migration 2) migrate your test db 3) run `rake test:units` You''ll get a prompt to run migrations, which only goes away if you migrate your *development* db. I also find that behavior strange. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder wrote:> On Sun, Jun 27, 2010 at 6:47 AM, Marnen Laibow-Koser > <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> anywho wrote: >>> does rails always need to update the development database before >>> running the >>> tests? It seems to insisit on running db:migrate before. >> >> Your production DB is not the dev DB, so you needn''t migrate it before >> tests pass � You can also just migrate the test DB itself > > Which ignores the original question, rephrased: > > 1) generate a migration > 2) migrate your test db > 3) run `rake test:units` > > You''ll get a prompt to run migrations, which only goes away if you > migrate your *development* db. > > I also find that behavior strange.I''ve never done it in that order, so didn''t realize that part. I also don''t use Test::Unit; not sure if that''s significant. Thanks for the clarification.> > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I also don''t use Test::Unit. I use Rspec, and I assumed, correctly it would seem, that the behavior was the same. Rake db:test:clone just clones from the development, no? On Jun 27, 7:27 am, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hassan Schroeder wrote: > > On Sun, Jun 27, 2010 at 6:47 AM, Marnen Laibow-Koser > > <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> anywho wrote: > >>> does rails always need to update the development database before > >>> running the > >>> tests? It seems to insisit on running db:migrate before. > > >> Your production DB is not the dev DB, so you needn''t migrate it before > >> tests pass You can also just migrate the test DB itself > > > Which ignores the original question, rephrased: > > > 1) generate a migration > > 2) migrate your test db > > 3) run `rake test:units` > > > You''ll get a prompt to run migrations, which only goes away if you > > migrate your *development* db. > > > I also find that behavior strange. > > I''ve never done it in that order, so didn''t realize that part. I also > don''t use Test::Unit; not sure if that''s significant. Thanks for the > clarification. > > > > > -- > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > twitter: @hassan > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
yes it does On Jun 28, 5:44 am, anywho <eydai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I also don''t use Test::Unit. I use Rspec, and I assumed, correctly it > would seem, that the behavior was the same. > > Rake db:test:clone just clones from the development, no? > > On Jun 27, 7:27 am, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > Hassan Schroeder wrote: > > > On Sun, Jun 27, 2010 at 6:47 AM, Marnen Laibow-Koser > > > <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > >> anywho wrote: > > >>> does rails always need to update the development database before > > >>> running the > > >>> tests? It seems to insisit on running db:migrate before. > > > >> Your production DB is not the dev DB, so you needn''t migrate it before > > >> tests pass You can also just migrate the test DB itself > > > > Which ignores the original question, rephrased: > > > > 1) generate a migration > > > 2) migrate your test db > > > 3) run `rake test:units` > > > > You''ll get a prompt to run migrations, which only goes away if you > > > migrate your *development* db. > > > > I also find that behavior strange. > > > I''ve never done it in that order, so didn''t realize that part. I also > > don''t use Test::Unit; not sure if that''s significant. Thanks for the > > clarification. > > > > -- > > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > twitter: @hassan > > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.