diff options
Diffstat (limited to 'actionmailer/test/old_base/adv_attr_test.rb')
-rw-r--r-- | actionmailer/test/old_base/adv_attr_test.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/actionmailer/test/old_base/adv_attr_test.rb b/actionmailer/test/old_base/adv_attr_test.rb deleted file mode 100644 index c5a6b6d88b..0000000000 --- a/actionmailer/test/old_base/adv_attr_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'abstract_unit' -require 'action_mailer/adv_attr_accessor' - -class AdvAttrTest < ActiveSupport::TestCase - class Person - cattr_reader :protected_instance_variables - @@protected_instance_variables = [] - - extend ActionMailer::AdvAttrAccessor - adv_attr_accessor :name - end - - def setup - ActiveSupport::Deprecation.silenced = true - @person = Person.new - end - - def teardown - ActiveSupport::Deprecation.silenced = false - end - - def test_adv_attr - assert_nil @person.name - @person.name 'Bob' - assert_equal 'Bob', @person.name - end - - def test_adv_attr_writer - assert_nil @person.name - @person.name = 'Bob' - assert_equal 'Bob', @person.name - end - - def test_raise_an_error_with_multiple_args - assert_raise(ArgumentError) { @person.name('x', 'y') } - end - - def test_ivar_is_added_to_protected_instnace_variables - assert Person.protected_instance_variables.include?('@name') - end -end |