Sha256: 09037ba9d71eed2acfffbbc4d33c2aaf576b77790d7f330afec396887926d436

Contents?: true

Size: 492 Bytes

Versions: 15

Compression:

Stored size: 492 Bytes

Contents

shared_examples :entity_collection do |entity_type|
  let(:params) { double(headers: {}, parsed_body: [{}]) }

  subject { described_class.new(params) }

  context "#build" do
    it "returns a collection(#{described_class})" do
      expect(subject.build).to be_a(described_class)
    end
  end

  context "#collection" do
    before :each do
      subject.build
    end

    it "returns items(#{entity_type})" do
      expect(subject.collection).to all(be_a(entity_type))
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
myfinance-1.8.2 spec/support/shared_examples/entity_collection.rb
myfinance-1.8.1 spec/support/shared_examples/entity_collection.rb
myfinance-1.8.0 spec/support/shared_examples/entity_collection.rb
myfinance-1.7.0 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.6 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.5 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.4 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.3 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.1 spec/support/shared_examples/entity_collection.rb
myfinance-1.6.0 spec/support/shared_examples/entity_collection.rb
myfinance-1.5.0 spec/support/shared_examples/entity_collection.rb
myfinance-1.4.1 spec/support/shared_examples/entity_collection.rb
myfinance-1.4.0 spec/support/shared_examples/entity_collection.rb
myfinance-1.3.1 spec/support/shared_examples/entity_collection.rb
myfinance-1.3.0 spec/support/shared_examples/entity_collection.rb