spec/lib/application_spec.rb in picky-0.10.5 vs spec/lib/application_spec.rb in picky-0.11.0

- old
+ new

@@ -6,13 +6,12 @@ describe "integration" do it "should run ok" do lambda { class MinimalTestApplication < Application - books = index :books, - Sources::DB.new('SELECT id, title FROM books', :file => 'app/db.yml'), - category(:title) + books = index :books, Sources::DB.new('SELECT id, title FROM books', :file => 'app/db.yml') + books.category :title full = Query::Full.new books live = Query::Live.new books @@ -40,15 +39,13 @@ normalizes_words: [[/Deoxyribonucleic Acid/i, 'DNA']], substitutes_characters_with: CharacterSubstitution::European.new, maximum_tokens: 5 - books_index = index :books, - Sources::DB.new('SELECT id, title, author, isbn13 as isbn FROM books', :file => 'app/db.yml'), - category(:title, :similarity => Similarity::DoubleLevenshtone.new(3)), # Up to three similar title word indexed. - category(:author), - category(:isbn, :partial => Partial::None.new) # Partially searching on an ISBN makes not much sense. - + books_index = index :books, Sources::DB.new('SELECT id, title, author, isbn13 as isbn FROM books', :file => 'app/db.yml') + books_index.category :title, similarity: Similarity::DoubleLevenshtone.new(3) # Up to three similar title word indexed. + books_index.category :author + books_index.category :isbn, partial: Partial::None.new # Partially searching on an ISBN makes not much sense. full = Query::Full.new books_index live = Query::Live.new books_index route %r{^/books/full} => full \ No newline at end of file