require 'spec_helper'

describe Metrics::Accessibility do

  it "should split a given text into its words" do
    text = "Estimates of average farm rent prices by farm type."
    expectations = ['Estimates', 'of', 'average', 'farm', 'rent', 'prices',
                    'by', 'farm', 'type']

    words = Metrics::Accessibility.split_to_words(text)
    words.should match_array expectations
  end
  
end

require 'spec_helper'

describe Metrics::Accessibility do

  it "should split a given text into its words" do
    
    text = "Estimates of average farm rent prices by farm type."
    expectations = ['Estimates', 'of', 'average', 'farm', 'rent', 'prices',
                    'by', 'farm', 'type']

    words = Metrics::Accessibility.split_to_words(text)
    words.should match_array expectations

    words = Metrics::Accessibility.split_to_words("")
    words.should match_array []

    words = Metrics::Accessibility.split_to_words("Estimates")
    words.should match_array ['Estimates']

  end
  
end

Add more tests for the word splitter
Add more tests for the word splitter

Obiously one test is ridicilous too few, so I just added two more.

Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
