Sha256: fbed32ffee3fe74dc9ed8f35d7b8799fc922f148a33c6d71125783b26e5c5cef
Contents?: true
Size: 620 Bytes
Versions: 20
Compression:
Stored size: 620 Bytes
Contents
require 'spec_helper' RSpec.describe RecordCollection::Base do describe '#ids' do it 'returns the ids of the collection' do employee = Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false described_class.new([employee]).ids.should eq [employee.id] end it 'Filters out nil records' do employee = Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false described_class.new([employee, nil]).ids.should eq [employee.id] end it 'returns an empty array for an empty collection' do described_class.new.ids.should be_empty end end end
Version data entries
20 entries across 20 versions & 1 rubygems