Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a failing test for a Searchlogic::Search object not responding …

…to question-marked methods correctly.
  • Loading branch information...
commit 9f79b346e736b1d04e4db16c8debff70aec3c232 1 parent b2ebf53
@laserlemon laserlemon authored committed
Showing with 18 additions and 0 deletions.
  1. +18 −0 spec/search_spec.rb
View
18 spec/search_spec.rb
@@ -342,4 +342,22 @@
User.search(:order => "ascend_by_username").proxy_options.should == User.ascend_by_username.proxy_options
end
end
+
+ context "method delegation" do
+ it "should respond to count" do
+ User.create(:username => "bjohnson")
+ search1 = User.search(:username => "bjohnson")
+ search2 = User.search(:username => "nosnhojb")
+ search1.count.should == 1
+ search2.count.should == 0
+ end
+
+ it "should respond to empty?" do
+ User.create(:username => "bjohnson")
+ search1 = User.search(:username => "bjohnson")
+ search2 = User.search(:username => "nosnhojb")
+ search1.empty?.should == false
+ search2.empty?.should == true
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.