Sha256: b94682fc9ec410bdf3549e96b3ced9232c166c9307feb9599d99b9404d4c7ce2
Contents?: true
Size: 649 Bytes
Versions: 1
Compression:
Stored size: 649 Bytes
Contents
# encoding: utf-8 require "abstract_mapper/rspec" describe AbstractMapper::Functions, "#filter" do let(:arguments) { [:filter, -> v { v - 1 if v > 3 }] } it_behaves_like :transforming_immutable_data do let(:input) { [] } let(:output) { [] } end it_behaves_like :transforming_immutable_data do let(:input) { [1, 4, 9, 7, 2, 5] } let(:output) { [3, 8, 6, 4] } end it_behaves_like :transforming_immutable_data do let(:arguments) { [:filter, -> v { [v - 1] if v > 3 }] } let(:input) { [1, 4, 9, 7, 2, 5] } let(:output) { [3, 8, 6, 4] } end end # describe AbstractMapper::Functions#filter
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
abstract_mapper-0.0.1 | spec/unit/abstract_mapper/functions/filter_spec.rb |