Sha256: 4c0714ff8aa528e2490bf3125c7523a29ee9e8d27f9df72ffcba47b76f3b2648

Contents?: true

Size: 451 Bytes

Versions: 2

Compression:

Stored size: 451 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')

require 'test/unit'

require 'glue/logger'
require 'glue/property'

N::Property.type_checking = true

module Test # :nodoc: all

class Person 
	prop_accessor :age, Fixnum
	
	def initialize(age = nil)
		@age = age
	end

end

class TC_PropertiesTypeChecking < Test::Unit::TestCase

	def test_all
		per = Person.new
		assert_raises(RuntimeError) {
			per.age = 'Hello'
		}
	end
	
end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.10.0 test/glue/tc_property_type_checking.rb
nitro-0.11.0 test/glue/tc_property_type_checking.rb