From df2d96a7f05aebca3e9d2367c2a248125b24dca6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 22 May 2009 11:10:41 -0700 Subject: Move misplaced test --- actionmailer/test/adv_attr_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 actionmailer/test/adv_attr_test.rb (limited to 'actionmailer/test') diff --git a/actionmailer/test/adv_attr_test.rb b/actionmailer/test/adv_attr_test.rb new file mode 100644 index 0000000000..fd909a5627 --- /dev/null +++ b/actionmailer/test/adv_attr_test.rb @@ -0,0 +1,18 @@ +require 'abstract_unit' +require 'action_mailer/adv_attr_accessor' + +class AdvAttrTest < Test::Unit::TestCase + class Person + include ActionMailer::AdvAttrAccessor + adv_attr_accessor :name + end + + def test_adv_attr + bob = Person.new + assert_nil bob.name + bob.name 'Bob' + assert_equal 'Bob', bob.name + + assert_raise(ArgumentError) {bob.name 'x', 'y'} + end +end -- cgit v1.2.3