Tuesday, August 17, 2010

[Rails] Re: How to development Database for testing

Take a look at some Rails testing resources - http://guides.rubyonrails.org/testing.html
- take a look at the fixtures part.

I can't think of a reason not to have a separate testing database or
to try and run tests on the dev db, unless you are trying to re-invent
the wheel and make your own test suite. I think quite a few of us have
had the experience of trying to build something, like unit tests, that
have in place several standard solutions already.

On Aug 17, 9:51 am, Ar Chron <li...@ruby-forum.com> wrote:
> Rajkumar Surabhi wrote:
> > Marnen Laibow-Koser wrote:
>
> > hi,
> > May be but i need it to use single development database for both
> > enviroments
>
> Rails makes the right things to do very easy, and if you stray outside
> that, well you made a conscious decision to go that route, and bear the
> consequences.
>
> You *are* using automated testing aren't you?
>
> You *are* keeping your tests up to date with the code and data changes
> you make in your development database on an ongoing basis?
>
> You really need to look into some automated testing tools available for
> Rails to do this with any kind of replicability and efficiency.
>
> If you absolutely, positively, against-all-reason-and-recommendation
> have to use the same database for dev and test, I would still not do
> exactly that.
>
> I'd suggest you use sqlite for your development database, and copy your
> development.sqlite3 file to test.sqlite3 before running your tests, each
> and every time.
>
> --
> 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@googlegroups.com.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate