Sha256: 2a79e0b40dfae02e98b1d127a8bbbe71089db87ef3fa602089daec6385976033
Contents?: true
Size: 726 Bytes
Versions: 6
Compression:
Stored size: 726 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe ActionKitRest::Response::Collection do let(:meta) { double } let(:objects) { double } subject { ActionKitRest::Response::Collection.new(meta, objects) } describe 'initialization' do it 'should set meta and objects' do expect(subject.meta).to eq(meta) expect(subject.objects).to eq(objects) end end describe 'each' do let(:item1) { double } let(:item2) { double } let(:objects) { [item1, item2] } it 'should return all collection items' do expect(subject.count).to eq(2) expect(subject.any? { |i| i == item1 }).to be_truthy expect(subject.any? { |i| i == item2 }).to be_truthy end end end
Version data entries
6 entries across 6 versions & 1 rubygems