Sha256: 0134239b675e3bbb5098bc902b4b72dcdba743c2c707740e7dabb87c90aa15f6

Contents?: true

Size: 585 Bytes

Versions: 28

Compression:

Stored size: 585 Bytes

Contents

require 'spec_helper'

describe Mongoid::FakeCriteria do

  context "with the books ['book 1', 'book 2', 'book 3', 'book 4']" do
    let(:books) { Mongoid::FakeCriteria.new(['book 1', 'book 2', 'book 3', 'book 4']) }

    describe "#limit" do
      the ("books.limit(2).raw") { should eql ['book 1', 'book 2'] }
      the ("books.limit(0).raw") { should eql ['book 1', 'book 2', 'book 3', 'book 4'] }
      the ("books.limit(6).raw") { should eql ['book 1', 'book 2', 'book 3', 'book 4'] }
    end

    context "#count" do
      the ("books.count") { should eql 4 }
    end
  end

end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
ants-0.3.14 spec/mongoid/fake_criteria_spec.rb
ants-0.3.13 spec/mongoid/fake_criteria_spec.rb
ants-0.3.12 spec/mongoid/fake_criteria_spec.rb
ants-0.3.11 spec/mongoid/fake_criteria_spec.rb
ants-0.3.10 spec/mongoid/fake_criteria_spec.rb
ants-0.3.9 spec/mongoid/fake_criteria_spec.rb
ants-0.3.5 spec/mongoid/fake_criteria_spec.rb
ants-0.3.4 spec/mongoid/fake_criteria_spec.rb
ants-0.3.3 spec/mongoid/fake_criteria_spec.rb
ants-0.3.2 spec/mongoid/fake_criteria_spec.rb
ants-0.3.1 spec/mongoid/fake_criteria_spec.rb
ants-0.3.0 spec/mongoid/fake_criteria_spec.rb
ants-0.2.8 spec/mongoid/fake_criteria_spec.rb
ants-0.2.7 spec/mongoid/fake_criteria_spec.rb
ants-0.2.6 spec/mongoid/fake_criteria_spec.rb
ants-0.2.5 spec/mongoid/fake_criteria_spec.rb
ants-0.2.4 spec/mongoid/fake_criteria_spec.rb
ants-0.2.3 spec/mongoid/fake_criteria_spec.rb
ants-0.2.2 spec/mongoid/fake_criteria_spec.rb
ants-0.2.1 spec/mongoid/fake_criteria_spec.rb