aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-08-07 17:04:19 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-08-07 17:04:19 -0700
commit019ed5a7c0aac4f1a5924b4a575438f12be18f11 (patch)
tree90291dbd67db17d9544168ea90b6c09d8097b8c7 /activerecord
parent482a6f716fab5ea6431e15ee2603b62a1b2f0790 (diff)
downloadrails-019ed5a7c0aac4f1a5924b4a575438f12be18f11.tar.gz
rails-019ed5a7c0aac4f1a5924b4a575438f12be18f11.tar.bz2
rails-019ed5a7c0aac4f1a5924b4a575438f12be18f11.zip
Don't rely on T::U::TestCase#name
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/migration_test.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 03788bf69e..72d4892435 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -737,19 +737,20 @@ if ActiveRecord::Base.connection.supports_migrations?
def test_change_column
Person.connection.add_column 'people', 'age', :integer
- old_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
+ label = "test_change_column Columns"
+ old_columns = Person.connection.columns(Person.table_name, label)
assert old_columns.find { |c| c.name == 'age' and c.type == :integer }
assert_nothing_raised { Person.connection.change_column "people", "age", :string }
- new_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
+ new_columns = Person.connection.columns(Person.table_name, label)
assert_nil new_columns.find { |c| c.name == 'age' and c.type == :integer }
assert new_columns.find { |c| c.name == 'age' and c.type == :string }
- old_columns = Topic.connection.columns(Topic.table_name, "#{name} Columns")
+ old_columns = Topic.connection.columns(Topic.table_name, label)
assert old_columns.find { |c| c.name == 'approved' and c.type == :boolean and c.default == true }
assert_nothing_raised { Topic.connection.change_column :topics, :approved, :boolean, :default => false }
- new_columns = Topic.connection.columns(Topic.table_name, "#{name} Columns")
+ new_columns = Topic.connection.columns(Topic.table_name, label)
assert_nil new_columns.find { |c| c.name == 'approved' and c.type == :boolean and c.default == true }
assert new_columns.find { |c| c.name == 'approved' and c.type == :boolean and c.default == false }
assert_nothing_raised { Topic.connection.change_column :topics, :approved, :boolean, :default => true }