diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-29 09:04:47 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-29 09:04:47 -0200 |
commit | 390449ab8c55dacc08517bc270c6203bb1f50e02 (patch) | |
tree | e87455ea620155254511180cc1f08c5544ed195c /activerecord/test/cases/migration/column_positioning_test.rb | |
parent | 56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff) | |
parent | d1374f99bf3090f3e659687c112ed0c5c0865cfb (diff) | |
download | rails-390449ab8c55dacc08517bc270c6203bb1f50e02.tar.gz rails-390449ab8c55dacc08517bc270c6203bb1f50e02.tar.bz2 rails-390449ab8c55dacc08517bc270c6203bb1f50e02.zip |
Merge pull request #16833 from sferik/symbol_to_proc
Pass symbol as an argument instead of a block
Diffstat (limited to 'activerecord/test/cases/migration/column_positioning_test.rb')
-rw-r--r-- | activerecord/test/cases/migration/column_positioning_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/migration/column_positioning_test.rb b/activerecord/test/cases/migration/column_positioning_test.rb index 77a752f050..62186e13a5 100644 --- a/activerecord/test/cases/migration/column_positioning_test.rb +++ b/activerecord/test/cases/migration/column_positioning_test.rb @@ -25,30 +25,30 @@ module ActiveRecord if current_adapter?(:MysqlAdapter, :Mysql2Adapter) def test_column_positioning - assert_equal %w(first second third), conn.columns(:testings).map {|c| c.name } + assert_equal %w(first second third), conn.columns(:testings).map(&:name) end def test_add_column_with_positioning conn.add_column :testings, :new_col, :integer - assert_equal %w(first second third new_col), conn.columns(:testings).map {|c| c.name } + assert_equal %w(first second third new_col), conn.columns(:testings).map(&:name) end def test_add_column_with_positioning_first conn.add_column :testings, :new_col, :integer, :first => true - assert_equal %w(new_col first second third), conn.columns(:testings).map {|c| c.name } + assert_equal %w(new_col first second third), conn.columns(:testings).map(&:name) end def test_add_column_with_positioning_after conn.add_column :testings, :new_col, :integer, :after => :first - assert_equal %w(first new_col second third), conn.columns(:testings).map {|c| c.name } + assert_equal %w(first new_col second third), conn.columns(:testings).map(&:name) end def test_change_column_with_positioning conn.change_column :testings, :second, :integer, :first => true - assert_equal %w(second first third), conn.columns(:testings).map {|c| c.name } + assert_equal %w(second first third), conn.columns(:testings).map(&:name) conn.change_column :testings, :second, :integer, :after => :third - assert_equal %w(first third second), conn.columns(:testings).map {|c| c.name } + assert_equal %w(first third second), conn.columns(:testings).map(&:name) end end end |