rubyonrailsin

A Ruby and Rails talk

Thursday, March 11, 2010


[Rails] load seeds.rb in test and no truncating data

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hello,

I need to load the seeds.rb into my test environment in order to test
the controllers.

I just added:

require "#{Rails.root}/db/seeds.rb"

to test_helper.rb

But, of course, it's seeding the data whenever I test something. The
seeds.rb is quite big and takes about 2 minutes to load so when I test
one single file it's taking quite a lot of time to load the seed.

Can I somehow prevent truncating the data and seeding the data every
time I test?
--
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@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.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive