Don't save fixtures into database

Hi,

I’m using RSpec on Rails and it seems that my fixtures are saved into
the database. I don’t want that. Does the fixtures call take any
parameters to don’t commit the examples to the database?
I can’t find the docs for that. Can anyone point to me where they are?

Thanks,
Tiberiu

And which database did you configure in your database.yml, the same
database
that your development environment is using? They should be in different
databases because when you run the specs it will reload all data in the
tables that relate to the fixtures you’re calling.

On Mon, May 19, 2008 at 3:51 PM, Mr_Tibs [email protected]
wrote:


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg

Rails T.,

linking to free ebooks on your site like that is illegal. Please do not
link
to ebooks of books that authors have worked so hard on. Remove the link
from
your signature.

</off topic>

On Mon, May 19, 2008 at 4:35 PM, Rails T. <
[email protected]> wrote:


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg

Try to make different database for your test environment so it will not
be mixed to your development or production database.

Reinhart
http://teapoci.blogspot.com

ok I will close it. thank you Ryan.

Thanks Ryan. I was kind of surprised when I had to manually change
spec_helper.rb and set ENV[“RAILS_ENV”] to “development”. I will
create a test db.
I do want to know, is there a way of not saving the fixtures in the
database, or do I have to delete them in the teardown method?

Thanks,
Tiberiu

Because my model creates files/directories on the disk.

On May 19, 3:11 pm, “Ryan B. (Radar)” [email protected]

Why would you want to delete them? The fixtures are going to be in the
test
database until you load more fixtures in.

On Tue, May 20, 2008 at 6:01 AM, Mr_Tibs [email protected]
wrote:


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs