Sha256: a57c70fd7ccf311d33757fec74f9deb2f2fa4bde93d09ec464fef654ac2faa13
Contents?: true
Size: 1.46 KB
Versions: 4
Compression:
Stored size: 1.46 KB
Contents
require "examples/example_helper" module RR module Expectations describe TimesCalledExpectation, ' with AnyTimesMatcher', :shared => true do it_should_behave_like "RR::Expectations::TimesCalledExpectation" before do @at_least = TimesCalledMatchers::AnyTimesMatcher.new @expectation = TimesCalledExpectation.new(@scenario, @at_least) end end describe TimesCalledExpectation, "#verify! with AnyTimesMatcher" do it_should_behave_like "RR::Expectations::TimesCalledExpectation with AnyTimesMatcher" it "always passes" do @expectation.verify! 10.times {@expectation.attempt!} @expectation.verify! end end describe TimesCalledExpectation, "#attempt? with AnyTimesMatcher" do it_should_behave_like "RR::Expectations::TimesCalledExpectation with AnyTimesMatcher" it "always returns true" do @expectation.should be_attempt 10.times {@expectation.attempt!} @expectation.should be_attempt end end describe TimesCalledExpectation, "#attempt! with AnyTimesMatcher" do it_should_behave_like "RR::Expectations::TimesCalledExpectation with AnyTimesMatcher" it "always passes" do 10.times {@expectation.attempt!} end end describe TimesCalledExpectation, "#terminal? with AnyTimesMatcher" do it_should_behave_like "RR::Expectations::TimesCalledExpectation with AnyTimesMatcher" it "returns false" do @expectation.should_not be_terminal end end end end
Version data entries
4 entries across 4 versions & 1 rubygems