spec/lib/application_spec.rb in picky-2.0.0.pre2 vs spec/lib/application_spec.rb in picky-2.0.0.pre3

- old
+ new

@@ -40,17 +40,19 @@ maximum_tokens: 5 books_index = Index::Memory.new :books, Sources::DB.new('SELECT id, title, author, isbn13 as isbn FROM books', :file => 'app/db.yml') books_index.define_category :title, - similarity: Similarity::DoubleLevenshtone.new(3) # Up to three similar title word indexed. - books_index.define_category :author + similarity: Similarity::DoubleMetaphone.new(3) # Up to three similar title word indexed. + books_index.define_category :author, + similarity: Similarity::Soundex.new(2) books_index.define_category :isbn, partial: Partial::None.new # Partially searching on an ISBN makes not much sense. geo_index = Index::Memory.new :geo, Sources::CSV.new(:location, :north, :east, file: 'data/ch.csv', col_sep: ',') do - category :location + category :location, + similarity: Similarity::Metaphone.new(4) ranged_category :north1, 1, precision: 3, from: :north ranged_category :east1, 1, precision: 3, from: :east end rack_adapter.stub! :exclaim # Stopping it from exclaiming. @@ -72,9 +74,17 @@ end it 'tells the rack adapter to finalize' do Application.rack_adapter.should_receive(:finalize).once.with Application.finalize + end + end + + describe 'check' do + it 'does something' do + Application.should_receive(:warn).once.with "\nWARNING: No routes defined for application configuration in Class.\n\n" + + Application.check end end describe 'delegation' do it "should delegate route" do \ No newline at end of file