aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-05-16 17:24:07 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-05-16 17:24:07 -0700
commit9c734c51351a21acf247f0780f975eeb9261cc6f (patch)
treeb878d270dcf1948e82141631366f0a07920fb9f1 /activerecord/test
parente2a070cf47fb9a845ecf53ff2f437390598fe0b7 (diff)
parenta57990ff51800bb05cebaf102e7d288487c98bd8 (diff)
downloadrails-9c734c51351a21acf247f0780f975eeb9261cc6f.tar.gz
rails-9c734c51351a21acf247f0780f975eeb9261cc6f.tar.bz2
rails-9c734c51351a21acf247f0780f975eeb9261cc6f.zip
Merge pull request #6358 from jfirebaugh/schema_define
Call methods on the correct instance in AR::Schema.define
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/ar_schema_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/ar_schema_test.rb b/activerecord/test/cases/ar_schema_test.rb
index 588adc38e3..b2eac0349b 100644
--- a/activerecord/test/cases/ar_schema_test.rb
+++ b/activerecord/test/cases/ar_schema_test.rb
@@ -37,6 +37,13 @@ if ActiveRecord::Base.connection.supports_migrations?
end
end
end
+
+ def test_schema_subclass
+ Class.new(ActiveRecord::Schema).define(:version => 9) do
+ create_table :fruits
+ end
+ assert_nothing_raised { @connection.select_all "SELECT * FROM fruits" }
+ end
end
end