Sha256: 48c662ee93fe05e1de4862a1543db214d88a4f2dd558807b7bdde4f9d0eb11da

Contents?: true

Size: 519 Bytes

Versions: 4

Compression:

Stored size: 519 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
=begin
		FIXME: does not work when run in the full test suite.
		assert_raises(RuntimeError) {
			per.age = 'Hello'
		}
=end
	end
	
end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
glue-0.13.0 test/glue/tc_property_type_checking.rb
glue-0.14.0 test/glue/tc_property_type_checking.rb
glue-0.15.0 test/glue/tc_property_type_checking.rb
nitro-0.12.0 test/glue/tc_property_type_checking.rb