Sha256: 677e7103dec0be401f185f750b1cc4a607d98d0611912297f987d0d2669021d7
Contents?: true
Size: 875 Bytes
Versions: 116
Compression:
Stored size: 875 Bytes
Contents
require 'spec_helper' describe Module do describe 'each_delegate' do context "with correct params" do before(:each) do @klass = Class.new do each_delegate :bli, :bla, :blu, :to => :@some_enumerable def initialize some_enumerable @some_enumerable = some_enumerable end end end it 'should send each a bli' do bli = stub :bli delegating = @klass.new [bli, bli, bli, bli] bli.should_receive(:bli).exactly(4).times delegating.bli end end context "without correct params" do it 'should send each a bli' do lambda do Class.new do each_delegate :bli, :bla, :blu # :to missing end end.should raise_error(ArgumentError) end end end end
Version data entries
116 entries across 116 versions & 1 rubygems