Sha256: 1f0d86a594fedc3407a96423605d76d3b7934f804876d9b8133af98f7caeb0cf
Contents?: true
Size: 487 Bytes
Versions: 11
Compression:
Stored size: 487 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib') require 'test/unit' require 'glue/attribute' class TC_Attribute < Test::Unit::TestCase # :nodoc: all class Dummy cattr_accessor :value, 'Default' cattr_reader :reader, 3 end def test_attr assert_equal 'Default', Dummy.value assert_nothing_raised { Dummy.value = 2 } assert_equal 2, Dummy.value assert_equal 3, Dummy.reader assert_raise(NoMethodError) { Dummy.reader = 19 } end end
Version data entries
11 entries across 11 versions & 1 rubygems