Sha256: ce3db5d0e6838b753de0d892a7bfc10645c1691da84632339df89884ee6a5dd0
Contents?: true
Size: 469 Bytes
Versions: 7
Compression:
Stored size: 469 Bytes
Contents
require 'spec_helper' describe Transproc::ProcTransformations do describe '.bind' do let(:fn) { described_class.t(:bind, binding, proc) } let(:binding) { OpenStruct.new(prefix: prefix) } let(:proc) { -> v { [prefix, v].join('_') } } let(:prefix) { 'foo' } let(:input) { 'bar' } let(:output) { 'foo_bar' } subject { fn[input] } it 'binds the given proc to the specified binding' do is_expected.to eq(output) end end end
Version data entries
7 entries across 7 versions & 1 rubygems