diff options
Diffstat (limited to 'spec/mspec/spec/matchers/block_caller_spec.rb')
-rw-r--r-- | spec/mspec/spec/matchers/block_caller_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/mspec/spec/matchers/block_caller_spec.rb b/spec/mspec/spec/matchers/block_caller_spec.rb new file mode 100644 index 0000000000..d6793b9779 --- /dev/null +++ b/spec/mspec/spec/matchers/block_caller_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' +require 'mspec/expectations/expectations' +require 'mspec/matchers' + +describe BlockingMatcher do + it 'matches when a Proc blocks the caller' do + BlockingMatcher.new.matches?(proc { sleep }).should == true + end + + it 'does not match when a Proc does not block the caller' do + BlockingMatcher.new.matches?(proc { 1 }).should == false + end +end |