diff --git a/bin/robot b/bin/robot index dad5a5d4f..7db17d810 100755 --- a/bin/robot +++ b/bin/robot @@ -1,6 +1,6 @@ #!/bin/bash # -# Build and run for automatic tests +# Build and run for automatic tests # # fail later @@ -23,6 +23,7 @@ bundle install RAILS_ENV=test bundle exec rake db:drop RAILS_ENV=test bundle exec rake db:create RAILS_ENV=test bundle exec rake db:schema:load &> /dev/null +RAILS_ENV=test bundle exec rake api_log:test:schema:reload &> /dev/null RAILS_ENV=test bundle exec rake db:seed RAILS_ENV=test bundle exec rake assets:precompile diff --git a/lib/tasks/api_log.rake b/lib/tasks/api_log.rake index 5e7c6bbfd..b077cd0db 100644 --- a/lib/tasks/api_log.rake +++ b/lib/tasks/api_log.rake @@ -5,7 +5,7 @@ namespace :api_log do task :dump => [:environment] do filename = "#{Rails.root}/db/api_log_schema.rb" File.open(filename, 'w:utf-8') do |file| - ActiveRecord::Base.establish_connection(:api_log_development) + ActiveRecord::Base.establish_connection("api_log_#{Rails.env}".to_sym) ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file) end end