Sha256: 0782baaa3016d4229348e5b1d03a8be3a3d2f9c94ad41da603ee7f733445d5a6

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mspec-1.9.1 spec/matchers/block_caller_spec.rb
mspec-1.9.0 spec/matchers/block_caller_spec.rb