I am using Ruby on Rails 3.0.9 and RSpec 2. I would like to auto-load seed data in the test database before I tesst my application. That is, at the testing start up time (when I run tests) I would like to "auto-populate"\"auto-boot" the test database.
How can I populate the database with seed data?
P.S.: As I read around, (maybe) I should populate the test database by adding some code to the /spec/spec_helper.rb
file... but what code and how?
In my task/custom.rake
file I have:
namespace :test do
desc "Boot database"
task :boot => [:load, :seed] do
end
desc "Reboot database"
task :reboot => [:purge, :boot] do
end
end