Sha256: c0c4525cf1faff628e5af754df111124b1ac30ff5c544f2779a7a30177b75d8e

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

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

require 'test/unit'

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

Glue::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

6 entries across 6 versions & 1 rubygems

Version Path
glue-0.16.0 test/glue/tc_property_type_checking.rb
glue-0.17.0 test/glue/tc_property_type_checking.rb
glue-0.18.0 test/glue/tc_property_type_checking.rb
glue-0.18.1 test/glue/tc_property_type_checking.rb
glue-0.19.0 test/glue/tc_property_type_checking.rb
glue-0.20.0 test/glue/tc_property_type_checking.rb