1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Update specs using yield matcher

This commit is contained in:
Christian Haase 2014-09-12 17:55:59 +02:00 committed by Ryan Fitzgerald
parent 5b12626a41
commit 72b486f43b
2 changed files with 29 additions and 31 deletions

View file

@ -48,11 +48,10 @@ describe Pry::CommandSet do
end
it 'should pass arguments of the command to the block' do
@set.command 'foo' do |*args|
args.should == [1, 2, 3]
end
@set.run_command @ctx, 'foo', 1, 2, 3
expect { |probe|
@set.command('foo', &probe)
@set.run_command(@ctx, 'foo', 1, 2, 3)
}.to yield_with_args(1, 2, 3)
end
it 'should use the first argument as context' do