aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/dirty_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-02-26 01:45:04 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-02-27 03:14:33 +0900
commit322a4a13107b66814d3d5f802c7f63bbc6dd8f93 (patch)
tree51558b692c65b75856d5867b941514678a0d09b2 /activerecord/test/cases/dirty_test.rb
parent25c3227255dee0e937e69f58f0cffbf9318948bd (diff)
downloadrails-322a4a13107b66814d3d5f802c7f63bbc6dd8f93.tar.gz
rails-322a4a13107b66814d3d5f802c7f63bbc6dd8f93.tar.bz2
rails-322a4a13107b66814d3d5f802c7f63bbc6dd8f93.zip
Deprecate `supports_migrations?` on connection adapters
`supports_migrations?` was added at 4160b518 to determine if schema statements (`create_table`, `drop_table`, etc) are implemented in the adapter. But all tested databases has been supported migrations since a4fc93c3 at least.
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r--activerecord/test/cases/dirty_test.rb22
1 files changed, 10 insertions, 12 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index a43c06cd6e..c13a962e3e 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -566,19 +566,17 @@ class DirtyTest < ActiveRecord::TestCase
travel_back
end
- if ActiveRecord::Base.connection.supports_migrations?
- class Testings < ActiveRecord::Base; end
- def test_field_named_field
- ActiveRecord::Base.connection.create_table :testings do |t|
- t.string :field
- end
- assert_nothing_raised do
- Testings.new.attributes
- end
- ensure
- ActiveRecord::Base.connection.drop_table :testings rescue nil
- ActiveRecord::Base.clear_cache!
+ class Testings < ActiveRecord::Base; end
+ def test_field_named_field
+ ActiveRecord::Base.connection.create_table :testings do |t|
+ t.string :field
end
+ assert_nothing_raised do
+ Testings.new.attributes
+ end
+ ensure
+ ActiveRecord::Base.connection.drop_table :testings rescue nil
+ ActiveRecord::Base.clear_cache!
end
def test_datetime_attribute_can_be_updated_with_fractional_seconds