Sha256: 6fb6f77cfb02b9686af2a28ddbe34dd1109ff1dd4fc29efa84c9606641698a3d
Contents?: true
Size: 394 Bytes
Versions: 2
Compression:
Stored size: 394 Bytes
Contents
# frozen_string_literal: true describe Transproc do describe 'composition' do it 'allows composing two transformation functions' do input = '1' output = 1.0 to_i = Transproc::Function.new(->(value) { value.to_i }) to_f = Transproc::Function.new(->(value) { value.to_f }) result = to_i >> to_f expect(result[input]).to eql(output) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
transproc-1.1.1 | spec/unit/transproc_spec.rb |
transproc-1.1.0 | spec/unit/transproc_spec.rb |