diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-16 17:24:07 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-16 17:24:07 -0700 |
commit | 9c734c51351a21acf247f0780f975eeb9261cc6f (patch) | |
tree | b878d270dcf1948e82141631366f0a07920fb9f1 /activerecord/test | |
parent | e2a070cf47fb9a845ecf53ff2f437390598fe0b7 (diff) | |
parent | a57990ff51800bb05cebaf102e7d288487c98bd8 (diff) | |
download | rails-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.rb | 7 |
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 |