Sha256: e052cf08bc947446ee73846d02aec94edfbe9fee291d8d2a1f312bbc55b90dbd

Contents?: true

Size: 394 Bytes

Versions: 15

Compression:

Stored size: 394 Bytes

Contents

require 'spec_helper'

describe Octopus::CollectionProxy do
  describe 'method dispatch' do
    before :each do
      @client = Client.using(:canada).create!
      @client.items << Item.using(:canada).create!
    end

    it 'computes the size of the collection without loading it' do
      expect(@client.items.size).to eq(1)

      expect(@client.items.loaded?).to be false
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
ar-octopus-ruby-3-0.11.3 spec/octopus/collection_proxy_spec.rb
ar-octopus-ruby-3-0.11.2 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.10.2 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.10.1 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.10.0 spec/octopus/collection_proxy_spec.rb
ar-octopus-master-0.9.2.1 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.9.2 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.9.1 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.9.0 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.8.6 spec/octopus/collection_proxy_spec.rb
misha-ar-octopus-0.8.7 spec/octopus/collection_proxy_spec.rb
misha-ar-octopus-0.8.5 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.8.5 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.8.4 spec/octopus/collection_proxy_spec.rb
ar-octopus-0.8.3 spec/octopus/collection_proxy_spec.rb