Permalink
Browse files

Merge pull request #6880 from kennyj/fix_20120628

Fix wrong testcase for db:test:prepare, and wrong environment in AR rake task.
  • Loading branch information...
2 parents 52f6e47 + 6498bbe commit 565d54d9ec167a5b9caf91bb53505d1e98c0ded5 @carlosantoniodasilva carlosantoniodasilva committed Jun 27, 2012
View
2 activerecord/lib/active_record/railties/databases.rake
@@ -313,7 +313,7 @@ db_namespace = namespace :db do
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql")
case abcs[env]['adapter']
when /mysql/, /postgresql/, /sqlite/
- ActiveRecord::Tasks::DatabaseTasks.structure_load(abcs[Rails.env], filename)
+ ActiveRecord::Tasks::DatabaseTasks.structure_load(abcs[env], filename)
when 'sqlserver'
`sqlcmd -S #{abcs[env]['host']} -d #{abcs[env]['database']} -U #{abcs[env]['username']} -P #{abcs[env]['password']} -i #{filename}`
when 'oci', 'oracle'
View
2 railties/test/application/rake_test.rb
@@ -157,7 +157,7 @@ def test_db_test_prepare_when_using_sql_format
add_to_config "config.active_record.schema_format = :sql"
output = Dir.chdir(app_path) do
`rails generate scaffold user username:string;
- bundle exec rake db:migrate db:test:clone 2>&1 --trace`
+ bundle exec rake db:migrate db:test:prepare 2>&1 --trace`
end
assert_match(/Execute db:test:load_structure/, output)
end

0 comments on commit 565d54d

Please sign in to comment.