Permalink
Browse files

Bring important specs back

  • Loading branch information...
1 parent 5c41ad4 commit 586c0a609576082d8902b3def1804e23da7b9893 @mauriciozaffari mauriciozaffari committed Jul 12, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/mongoid_search_spec.rb
@@ -162,6 +162,16 @@
Product.full_text_search("apple motorola", :match => :all).size.should == 0
end
+ it "should return no results when a blank search is made" do
+ Mongoid::Search.allow_empty_search = false
+ Product.full_text_search("").size.should == 0
+ end
+
+ it "should return results when a blank search is made when :allow_empty_search is true" do
+ Mongoid::Search.allow_empty_search = true
+ Product.full_text_search("").size.should == 1
+ end
+
it "should search for embedded documents" do
Product.full_text_search("craddle").size.should == 1
end

0 comments on commit 586c0a6

Please sign in to comment.