fb63fc67fb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
20 lines
407 B
Ruby
20 lines
407 B
Ruby
require File.dirname(__FILE__) + '/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 |