Sha256: ca89e556a6e868a3d5cee4f9a3a5bd96544f4363bd19d97ed4d3dce922da19d3
Contents?: true
Size: 452 Bytes
Versions: 12
Compression:
Stored size: 452 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Collection do let(:data) do [1, 2, 3] end let(:collection) do DHS::Collection.new(DHS::Data.new(data)) end context 'enumerable' do it 'works with map' do expect( collection.map { |x| x + 1 } ).to eq [2, 3, 4] end it 'works with select' do expect( collection.select { |x| x == 2 } ).to eq [2] end end end
Version data entries
12 entries across 12 versions & 1 rubygems