spec/unit/function_spec.rb in transproc-0.3.1 vs spec/unit/function_spec.rb in transproc-0.3.2

- old
+ new

@@ -155,7 +155,19 @@ it 'can be applied to collection' do expect([:foo, :bar].map(&source)).to eql(%w(foo bar)) end end + + context 'with curried args' do + let(:source) { -> i, j { [i, j].join(' ') } } + + it 'works fine' do + fn = described_class.new(source, args: ['world']) + + result = fn.to_proc.call('hello') + + expect(result).to eql('hello world') + end + end end end