diff --git a/Rakefile b/Rakefile index 06c1a2b..b443cc4 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,6 @@ end APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) load 'rails/tasks/engine.rake' -require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) @@ -32,7 +31,7 @@ namespace :alchemy do desc "Prepares database for testing Alchemy" task :prepare do - system 'cd spec/dummy && RAILS_ENV=test bundle exec rake db:migrate:reset alchemy:db:seed && cd -' + system 'cd spec/dummy && RAILS_ENV=test bundle exec rake db:migrate:reset && cd -' end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 509ba17..46f23af 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,6 +16,7 @@ require "rspec/rails" require "capybara/rails" require 'factory_girl' +require 'alchemy/seeder' require 'alchemy/test_support/auth_helpers' require 'alchemy/test_support/controller_requests' require 'alchemy/test_support/integration_helpers' @@ -37,4 +38,7 @@ config.include Alchemy::TestSupport::IntegrationHelpers, :type => :feature config.include Alchemy::Engine.routes.url_helpers config.include FactoryGirl::Syntax::Methods + config.before(:suite) do + Alchemy::Seeder.seed! + end end