Skip to content

Commit

Permalink
Set db environment in spec prepare task
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Oct 24, 2017
1 parent 5434889 commit d3d5117
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ Bundler::GemHelper.install_tasks

namespace :alchemy do
namespace :spec do

desc "Prepares database for testing Alchemy"
task :prepare do
system 'cd spec/dummy && RAILS_ENV=test bundle exec rake db:migrate:reset && RAILS_ENV=test bundle exec rails g alchemy:devise:install --force && cd -'
system <<-BASH
cd spec/dummy
export RAILS_ENV=test
bin/rake db:environment:set
bin/rake db:migrate:reset
bin/rails g alchemy:devise:install --force
cd -
BASH
end
end
end

0 comments on commit d3d5117

Please sign in to comment.