Sha256: 7aa47b848e8aa824e533f5ddd718913fde62b3e5a9e7b78bc8c75fd7ab137187

Contents?: true

Size: 682 Bytes

Versions: 4

Compression:

Stored size: 682 Bytes

Contents

require "test_helper"

describe "Querying for namespaces" do

  before do
    @source ||= RbGCCXML.parse(full_dir("headers/namespaces.h"))
  end

  specify "can find a namespace" do
    upper = @source.namespaces.find(:name => "upper")
    upper.should be_a_kind_of(RbGCCXML::Namespace)

    inner1 = upper.namespaces("inner1")
    inner1.should be_a_kind_of(RbGCCXML::Namespace)
    inner1.name.should == "inner1"

    inner2 = upper.namespaces("inner2")
    inner2.should be_a_kind_of(RbGCCXML::Namespace)
    inner2.name.should == "inner2"

    nested = inner2.namespaces("nested")
    nested.should be_a_kind_of(RbGCCXML::Namespace)
    nested.name.should == "nested"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbgccxml-1.0.3 spec/namespaces_test.rb
rbgccxml-1.0.2 spec/namespaces_test.rb
rbgccxml-1.0.1 spec/namespaces_test.rb
rbgccxml-1.0 test/namespaces_test.rb