diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 13:41:29 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 13:41:29 -0800 |
commit | e9df07870fc16eaefbff60e0e80921489eefcd91 (patch) | |
tree | 5d026b585b76937689e9834f8cf7df99aaa13e16 /activerecord/test | |
parent | 4c99d0870c87e136b257e03fffdfc5f86c60ff34 (diff) | |
parent | 22df38ca3306684033039fd0bc20b1025f4f8e2a (diff) | |
download | rails-e9df07870fc16eaefbff60e0e80921489eefcd91.tar.gz rails-e9df07870fc16eaefbff60e0e80921489eefcd91.tar.bz2 rails-e9df07870fc16eaefbff60e0e80921489eefcd91.zip |
Merge pull request #8355 from steveklabnik/update_7418
Ensure that associations have a symbol argument.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb index c0f1945cec..d7f25f760e 100644 --- a/activerecord/test/cases/associations_test.rb +++ b/activerecord/test/cases/associations_test.rb @@ -289,6 +289,14 @@ class OverridingAssociationsTest < ActiveRecord::TestCase DifferentPeopleList.reflect_on_association(:has_one) ) end + + def test_requires_symbol_argument + assert_raises ArgumentError do + Class.new(Post) do + belongs_to "author" + end + end + end end class GeneratedMethodsTest < ActiveRecord::TestCase |