Sha256: f37ef3990926a59051003bbe99512592eaaafdd9fe84dc1ccda2209dd63cffa9
Contents?: true
Size: 921 Bytes
Versions: 2
Compression:
Stored size: 921 Bytes
Contents
require File.join(File.dirname(__FILE__), 'CONFIG.rb') require 'test/unit' require 'ostruct' require 'nitro/helper' class Base include Nitro::Helpers end module MyHelper def hello_world return 5 end end module AnotherHelper def bye_world return 0 end end module Funny def funny_world return 1 end end class MyBase < Base helper :my helper AnotherHelper end class TC_Helper < Test::Unit::TestCase # :nodoc: all def test_all assert !MyBase.public_instance_methods.include?('hello_world') assert MyBase.private_instance_methods.include?('hello_world') assert !MyBase.public_instance_methods.include?('bye_world') assert MyBase.private_instance_methods.include?('bye_world') # test a bug. MyBase.helper(Funny) assert !MyBase.public_instance_methods.include?('funny_world') assert MyBase.private_instance_methods.include?('funny_world') end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
nitro-0.41.0 | test/nitro/tc_helper.rb |
raw-0.49.0 | test/nitro/tc_helper.rb |