Sha256: 91af852d285afafe1cd2bb01dc66fb4808a2af351c1645ee2a7041bc98ba47d0

Contents?: true

Size: 697 Bytes

Versions: 2

Compression:

Stored size: 697 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

context "Wrapping Classes within classes" do
  def setup
    if !defined?(@@nested_built)
      super
      @@nested_built = true 
      Extension.new "nested" do |e|
        e.sources full_dir("headers/nested_classes.h")
        node = e.namespace "classes"
      end

      require 'nested'
    end
  end

  specify "should properly make nested classes available" do
    assert defined?(TestClass) 
    assert defined?(TestClass::InnerClass) 
    assert defined?(TestClass::InnerClass::Inner2) 

    TestClass.new.should.not.be.nil
    TestClass::InnerClass.new.should.not.be.nil
    TestClass::InnerClass::Inner2.new.should.not.be.nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbplusplus-0.9 test/nested_test.rb
rbplusplus-0.8 test/nested_test.rb