Sha256: 719dee5c338c6d6bdcd8346e20f3224f0c8b983bc670e3954cd5a32aab18581e
Contents?: true
Size: 652 Bytes
Versions: 3
Compression:
Stored size: 652 Bytes
Contents
require 'spec_helper' require 'engineyard-serverside/shell/yieldio' module EY module Serverside class Shell describe YieldIO do let(:yieldio) {described_class.new {|str| str.reverse}} describe '#<<' do let(:input) {'123'} let(:result) {yieldio << input} let(:block) {yieldio.instance_eval {@block}} it 'passes the input to the block' do expect(block).to receive(:call).with(input) result end it 'is the result of the block' do expect(result).to eql(input.reverse) end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems