Sha256: f9993bc52fc92a6efc11627bed7235a0d75a080162f0a111316281664ea2c2ec

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 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

4 entries across 4 versions & 1 rubygems

Version Path
glue-0.21.0 test/glue/tc_property_type_checking.rb
glue-0.21.2 test/glue/tc_property_type_checking.rb
glue-0.22.0 test/glue/tc_property_type_checking.rb
glue-0.23.0 test/glue/tc_property_type_checking.rb