blob: d6793b9779336de70664706cc12a74751926f3d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
|