Sha256: 217b151205a1fd8d35b63d171fa57919146062c7576ed4f0c6130c01b383c6a1

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

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

describe Solrizer::Extractor do
  
  before(:all) do
    @extractor = Solrizer::Extractor.new
  end
  
  describe ".format_node_value" do
    it "should strip white space out of the array and join it with a single blank" do
      Solrizer::Extractor.format_node_value([" test    \n   node    \t value \t"]).should == "test node value"
      Solrizer::Extractor.format_node_value([" test ", "     \n   node ", "   \t value \t"]).should == "test node value"
    end
    it "should return an empty string if given an argument of nil" do
      Solrizer::Extractor.format_node_value(nil).should == ""
    end
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solrizer-1.1.2 spec/units/extractor_spec.rb
solrizer-1.1.1 spec/units/extractor_spec.rb
solrizer-1.1.0 spec/units/extractor_spec.rb
solrizer-1.0.4 spec/units/extractor_spec.rb
solrizer-1.0.3 spec/units/extractor_spec.rb