1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionmailer/test/adv_attr_test.rb

19 lines
380 B
Ruby
Raw Normal View History

2009-05-22 14:10:41 -04:00
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
2009-05-22 14:10:41 -04:00
end