Sha256: 106df9d10fe72423032ca1870c7fdfde98ca0807ddfbbb82e6deea020ef5fa64
Contents?: true
Size: 981 Bytes
Versions: 23
Compression:
Stored size: 981 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../../../spec_helper") module RR module Expectations describe TimesCalledExpectation do context "when using a ProcMatcher" do it_should_behave_like "RR::Expectations::TimesCalledExpectation" before do stub(subject).foobar.times(lambda {|value| value == 2}) end describe "#verify" do it "passes after attempt! called 2 times" do subject.foobar subject.foobar RR.verify end it "fails after attempt! called 1 time" do subject.foobar lambda {RR.verify}.should raise_error(RR::Errors::TimesCalledError) end it "fails after attempt! called 3 times" do subject.foobar subject.foobar subject.foobar lambda {RR.verify}.should raise_error(RR::Errors::TimesCalledError) end end end end end end
Version data entries
23 entries across 19 versions & 5 rubygems