diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index e66c90c7fe..1ad6e6c3ee 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -221,6 +221,13 @@ class BasicsTest < Test::Unit::TestCase end end + def test_reader_for_invalid_column_names + # column names which aren't legal ruby ids + topic = Topic.find(:first) + topic.send(:define_read_method, "mumub-jumbo".to_sym, "mumub-jumbo", nil) + assert !Topic.read_methods.include?("mumub-jumbo") + end + def test_non_attribute_access_and_assignment topic = Topic.new assert !topic.respond_to?("mumbo") |