aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-05-26 11:34:02 -0300
committerEmilio Tagua <miloops@gmail.com>2009-05-26 11:34:02 -0300
commitb3d40546923b194a89be0d9e00758864fa60b9e8 (patch)
tree8acac475b371d61924c67a439704c82c61968fff /actionmailer
parentaa5512299041efb923cd582fd26009a72b9ec670 (diff)
parent2f59066470193c6219dfd958fc5d8096a2ddee68 (diff)
downloadrails-b3d40546923b194a89be0d9e00758864fa60b9e8.tar.gz
rails-b3d40546923b194a89be0d9e00758864fa60b9e8.tar.bz2
rails-b3d40546923b194a89be0d9e00758864fa60b9e8.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/adv_attr_test.rb18
1 files changed, 18 insertions, 0 deletions
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