Sha256: a96b44edb4d97eda54875b1a1ddbe6e96d78c95d7004c63c05f9256172813636

Contents?: true

Size: 693 Bytes

Versions: 5

Compression:

Stored size: 693 Bytes

Contents

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

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

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')
  end  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nitro-0.25.0 test/nitro/tc_helper.rb
nitro-0.26.0 test/nitro/tc_helper.rb
nitro-0.27.0 test/nitro/tc_helper.rb
nitro-0.28.0 test/nitro/tc_helper.rb
nitro-0.29.0 test/nitro/tc_helper.rb