Sha256: 8e8485953f0852311454969c2ca6f516b35b947171f5d31f1ce409978d2ac9d7

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
# License:   Apache License, Version 2.0

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

module RTM::Navigation::Topic
  describe self do
    before(:each) do
      @tm = get_used_tm_sys_tm
      @topic = @tm.get!("nikolaus")
      
      # puts @topic.class.ancestors
      
    end
    after(:each) do
      @tm.close
    end
#    describe "#reverse_scope" do
#      it "should give back all instances of Scoped that are Scoped by self" do
#        name = @topic.create_name("n_topic","some_name", ["s_topic"])
#        occurrence = @topic.create_occurrence("n_topic","some_name",{:scope => ["s_topic"]})
#        scoped = @tm.get("s_topic").reverse_scope
#        scoped.length.should == 2
#        scoped.include?(name).should be_true
#        scoped.include?(occurrence).should be_true
#      end
#      it "should give back all instances of Scoped that are Scoped by self but have other Themes as well" do
#        name = @topic.create_name("n_topic","some_name", ["s_topic","s_topic2"])
#        occurrence = @topic.create_occurrence("n_topic","some_name",{:scope => ["s_topic"]})
#        scoped = @tm.get("s_topic").reverse_scope
#        scoped.length.should == 2
#        scoped.include?(name).should be_true
#        scoped.include?(occurrence).should be_true
#      end
#      it "should give back an empty set if noting is scoped" do
#        @topic.reverse_scope.should be_empty
#      end
#    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rtm-0.3.1 spec/rtm/navigation/topic/scope_spec.rb
rtm-0.3.0 spec/rtm/navigation/topic/scope_spec.rb