Sha256: eafefd8ea4aed2b57e9c0c63182befdd68ca3744072866e357cb53a0c08fba18
Contents?: true
Size: 469 Bytes
Versions: 15
Compression:
Stored size: 469 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
15 entries across 15 versions & 2 rubygems