Sha256: 352d2bb7661c08b21f23370ace15aee7af174efd7bfd3671f8d6cf5d83daca95

Contents?: true

Size: 794 Bytes

Versions: 21

Compression:

Stored size: 794 Bytes

Contents

# encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe NameSpotter::ScientificName do
  
  describe "without doing anything" do
    before :each do
      @find_me = "M. musculus"
      @name = NameSpotter::ScientificName.new(@find_me, {:start_position => 30, :scientific_name => "Mus musculus"})
    end
    
    it "should have figured out the end position" do
      @name.end_pos.should eq @name.start_pos + @find_me.length - 1
    end
  end
  
  describe "unicode" do
    it "should handle unicode characters" do
      verbatim = "Slovenščina"
      name = NameSpotter::ScientificName.new(verbatim, {:start_position => 48193})
      name.verbatim.should eq verbatim
      name.end_pos.should eq name.start_pos + verbatim.length - 1
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
name-spotter-0.2.4 spec/scientific_name_spec.rb
name-spotter-0.2.3 spec/scientific_name_spec.rb
name-spotter-0.2.2 spec/scientific_name_spec.rb
name-spotter-0.2.1 spec/scientific_name_spec.rb
name-spotter-0.2.0 spec/scientific_name_spec.rb
name-spotter-0.1.11 spec/scientific_name_spec.rb
name-spotter-0.1.10 spec/scientific_name_spec.rb
name-spotter-0.1.9 spec/scientific_name_spec.rb
name-spotter-0.1.8 spec/scientific_name_spec.rb
name-spotter-0.1.7 spec/scientific_name_spec.rb
name-spotter-0.1.6 spec/scientific_name_spec.rb
name-spotter-0.1.5 spec/scientific_name_spec.rb
name-spotter-0.1.4 spec/scientific_name_spec.rb
name-spotter-0.1.3 spec/scientific_name_spec.rb
name-spotter-0.1.2 spec/scientific_name_spec.rb
name-spotter-0.1.1 spec/scientific_name_spec.rb
name-spotter-0.1.0 spec/scientific_name_spec.rb
name-spotter-0.0.7 spec/scientific_name_spec.rb
name-spotter-0.0.6 spec/scientific_name_spec.rb
name-spotter-0.0.5 spec/scientific_name_spec.rb