Sha256: c94378add6f021402b8b21782a44d5f595526a2dc1a63e87820d30d014dd949c
Contents?: true
Size: 582 Bytes
Versions: 1
Compression:
Stored size: 582 Bytes
Contents
# encoding: utf-8 require "transproc/rspec" describe AbstractMapper::Functions, "#compact" do let(:fn) { -> a, b { (a == b) ? [a + b] : [a, b] } } let(:arguments) { [:compact, fn] } it_behaves_like :transforming_immutable_data do let(:input) { [] } let(:output) { [] } end it_behaves_like :transforming_immutable_data do let(:input) { [1] } let(:output) { [1] } end it_behaves_like :transforming_immutable_data do let(:input) { [1, 1, 2, 3, 3] } let(:output) { [4, 6] } end end # describe AbstractMapper::Functions#compact
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
abstract_mapper-0.0.2 | spec/unit/abstract_mapper/functions/compact_spec.rb |