Skip to content
Browse files

Revert "Made test tasks respect RAILS_ENV"

This reverts commit 74389dd.
  • Loading branch information...
1 parent 08e0570 commit 2a03f03a01ce52cce8dbfd4fa8263a7669d90921 @rsim rsim committed Jun 8, 2009
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/active_record/connection_adapters/oracle_enhanced.rake
View
10 lib/active_record/connection_adapters/oracle_enhanced.rake
@@ -24,19 +24,17 @@ namespace :db do
end
namespace :test do
- redefine_task :clone_structure => [ :rails_env, "db:structure:dump", "db:test:purge" ] do
- env = RAILS_ENV ||= 'test'
+ redefine_task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do
abcs = ActiveRecord::Base.configurations
- ActiveRecord::Base.establish_connection(env.to_sym)
+ ActiveRecord::Base.establish_connection(:test)
IO.readlines("db/#{RAILS_ENV}_structure.sql").join.split("\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl.chop)
end
end
- redefine_task :purge => [:rails_env, :environment] do
- env = RAILS_ENV ||= 'test'
+ redefine_task :purge => :environment do
abcs = ActiveRecord::Base.configurations
- ActiveRecord::Base.establish_connection(env.to_sym)
+ ActiveRecord::Base.establish_connection(:test)
ActiveRecord::Base.connection.structure_drop.split("\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl.chop)
end

0 comments on commit 2a03f03

Please sign in to comment.
Something went wrong with that request. Please try again.