Sha256: 2cb673289a4a1ef2d821f46ecb758da1f0927f8ecdb57093cc88b6292a451840
Contents?: true
Size: 635 Bytes
Versions: 117
Compression:
Stored size: 635 Bytes
Contents
require "#{File.dirname(__FILE__)}/spec_helper" describe 'Using flow without a parameter' do it 'works like normal threads' do local do |big_cat, small_cat| flow { unify big_cat, small_cat.upcase } unify small_cat, 'cat' big_cat.should == 'CAT' end end end describe 'Using flow with a parameter' do it 'binds the parameter to the last line of the block' do local do |big_cat, small_cat, output| flow(output) do unify big_cat, small_cat.upcase 'returned' end unify small_cat, 'cat' big_cat.should == 'CAT' output.should == 'returned' end end end
Version data entries
117 entries across 117 versions & 3 rubygems