Created
November 20, 2008 23:13
-
-
Save mmmurf/27263 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec/spec_helper' | |
describe "ThinkingSphinx::ActiveRecord (testing total entries results) " do | |
before :all do | |
@sphinx.setup_sphinx | |
@sphinx.start | |
end | |
after :all do | |
@sphinx.stop | |
end | |
it "should have Buckleys" do | |
Person.search("Buckley").total_entries.should == 3 | |
end | |
it "should have n ids" do | |
Person.search(:with => {:ids => [1,2,3]}).total_entries.should == 3 | |
end | |
it "should contain be 245 people born in the sixties" do | |
nineteen_sixties = Time.utc(1960,"jan",1)..Time.utc(1970, "jan", 1) | |
Person.search(:with => {:birthday => nineteen_sixties}).total_entries.should == 245 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment