Sha256: 3f394c788679a6bd011d5b841b8bb1932179381bc576706ec8c92c28a2bee152

Contents?: true

Size: 1016 Bytes

Versions: 5

Compression:

Stored size: 1016 Bytes

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::Name
  
  describe "characteristics" do
    before(:each) do
      @tm = get_used_tm_sys_tm
      @topic = @tm.get!("Person")
    end
    after(:each) do
      @tm.close
    end

    describe "#reverse_characteristics" do
      before(:each) do
        @name = @topic.create_name("Name","Hans")
        @type = @tm.get!("something")
      end
      it "should give back the topic the Name belongs to" do
        @name.reverse_characteristics.should == @topic
      end
      it "should give back the topic the Name belongs to with the right name type" do
        @name.reverse_characteristics("Name").should == @topic
        @name.reverse_characteristics("something").should be_nil
        @name.reverse_characteristics("anything").should be_nil
      end
    end
    
  end #of describe "characteristics"
  
end #of module

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rtm-0.3.1 spec/rtm/navigation/name/characteristics_spec.rb
rtm-0.3.0 spec/rtm/navigation/name/characteristics_spec.rb
rtm-0.2.1 spec/rtm/navigation/name/characteristics_spec.rb
rtm-0.2.0 spec/rtm/navigation/name/characteristics_spec.rb
rtm-0.2 spec/rtm/navigation/name/characteristics_spec.rb