instiki/vendor/rails/actionpack/test/adv_attr_test.rb
Jacques Distler 5292899c9a Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
2008-05-17 23:22:34 -05:00

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