Skip to content

Commit

Permalink
Added a failing test for a Searchlogic::Search object not responding …
Browse files Browse the repository at this point in the history
…to question-marked methods correctly.
  • Loading branch information
laserlemon authored and binarylogic committed Nov 5, 2009
1 parent b2ebf53 commit 9f79b34
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/search_spec.rb
Expand Up @@ -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

0 comments on commit 9f79b34

Please sign in to comment.