Sha256: 75eb5feb99577f0ed9b2d34debd9b09f52081daa92d2df064f6f08054569c0e7

Contents?: true

Size: 446 Bytes

Versions: 21

Compression:

Stored size: 446 Bytes

Contents

require 'spec_helper'

describe ButterCMS::ButterCollection do
  let(:json) { {"data" => ["foo"], "meta" => {}} }
  let(:klass) { double('klass', :new => 'bar') }

  it 'implements #meta' do
    collection = ButterCMS::ButterCollection.new(klass, json)

    expect(collection.meta).to be_a(OpenStruct)
  end

  it 'implements #count' do
    collection = ButterCMS::ButterCollection.new(klass, json)

    expect(collection.count).to eq 1
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
buttercms-ruby-1.5 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.4 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.3.2 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.3.1 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.3.0 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.2.0 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.1.3 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.1.2 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.1.1 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.1.0 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.10 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.9 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.8 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.7 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.6 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.5 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.4 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.3 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.2 spec/lib/buttercms/butter_collection_spec.rb
buttercms-ruby-1.0.1 spec/lib/buttercms/butter_collection_spec.rb