Sha256: 69badfe2b1526bf787a74d047a43878587f9f2151af62c8af15c173e9234b82c

Contents?: true

Size: 361 Bytes

Versions: 26

Compression:

Stored size: 361 Bytes

Contents

require File.expand_path("../../spec_helper", __FILE__)

describe "Counting the objects matching a query" do
  before do
    User.all(:name => "Evil Monkey").each { |u| u.destroy }
    5.times { User.create :name => "Evil Monkey" }
  end

  it "does a count in the index to find out what matches" do
    User.count(:name => "Evil Monkey").should == 5
  end
end

Version data entries

26 entries across 26 versions & 7 rubygems

Version Path
ihoka-friendly-0.8.0.pre spec/integration/count_spec.rb
ihoka-friendly-0.7.1.2 spec/integration/count_spec.rb
ihoka-friendly-0.7.1.1 spec/integration/count_spec.rb
ihoka-friendly-0.7.1 spec/integration/count_spec.rb
ihoka-friendly-0.7.0 spec/integration/count_spec.rb
friendly-0.6.0 spec/integration/count_spec.rb
honkster-friendly-0.5.3 spec/integration/count_spec.rb
honkster-friendly-0.5.2 spec/integration/count_spec.rb
honkster-friendly-0.5.1 spec/integration/count_spec.rb
wayne-friendly-0.5.1 spec/integration/count_spec.rb
wego-friendly-0.5.1 spec/integration/count_spec.rb
arunthampi-friendly-0.5.1 spec/integration/count_spec.rb
friendly_postgres-0.5.1 spec/integration/count_spec.rb
friendly-0.5.1 spec/integration/count_spec.rb
friendly-0.5.0 spec/integration/count_spec.rb
friendly_postgres-0.4.5 spec/integration/count_spec.rb
friendly-0.4.5 spec/integration/count_spec.rb
friendly-0.4.4 spec/integration/count_spec.rb
friendly_postgres-0.4.3 spec/integration/count_spec.rb
friendly-0.4.3 spec/integration/count_spec.rb