mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
using symbol instead of string in establish_connection
This commit is contained in:
parent
f57e5f224b
commit
b9d79b1f5f
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ module ActiveRecord
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
ActiveRecord::Base.establish_connection 'arunit'
|
ActiveRecord::Base.establish_connection :arunit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -153,7 +153,7 @@ module ApplicationTests
|
||||||
`rails generate model book title:string;
|
`rails generate model book title:string;
|
||||||
bundle exec rake db:migrate db:structure:dump db:test:load_structure`
|
bundle exec rake db:migrate db:structure:dump db:test:load_structure`
|
||||||
ActiveRecord::Base.configurations = Rails.application.config.database_configuration
|
ActiveRecord::Base.configurations = Rails.application.config.database_configuration
|
||||||
ActiveRecord::Base.establish_connection 'test'
|
ActiveRecord::Base.establish_connection :test
|
||||||
require "#{app_path}/app/models/book"
|
require "#{app_path}/app/models/book"
|
||||||
#if structure is not loaded correctly, exception would be raised
|
#if structure is not loaded correctly, exception would be raised
|
||||||
assert Book.count, 0
|
assert Book.count, 0
|
||||||
|
|
Loading…
Reference in a new issue