diff options
Diffstat (limited to 'activesupport/test/configurable_test.rb')
-rw-r--r-- | activesupport/test/configurable_test.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/activesupport/test/configurable_test.rb b/activesupport/test/configurable_test.rb index 215a6e06b0..ef847fc557 100644 --- a/activesupport/test/configurable_test.rb +++ b/activesupport/test/configurable_test.rb @@ -38,7 +38,7 @@ class ConfigurableActiveSupport < ActiveSupport::TestCase assert_equal :bar, Parent.config.foo end - test "configuration accessors is not available on instance" do + test "configuration accessors are not available on instance" do instance = Parent.new assert !instance.respond_to?(:bar) @@ -95,6 +95,20 @@ class ConfigurableActiveSupport < ActiveSupport::TestCase config_accessor "invalid attribute name" end end + + assert_raises NameError do + Class.new do + include ActiveSupport::Configurable + config_accessor "invalid\nattribute" + end + end + + assert_raises NameError do + Class.new do + include ActiveSupport::Configurable + config_accessor "invalid\n" + end + end end def assert_method_defined(object, method) |