Sha256: 7fd25f7155cdd6a70fe14aaa315d524981ede63e4733842c40cc032ed70f256c
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
require "examples/example_helper" module RR module TimesCalledMatchers describe TimesCalledMatcher, ".create when passed a AnyTimesMatcher" do it "returns the passed in argument" do matcher = AnyTimesMatcher.new TimesCalledMatcher.create(matcher).should === matcher end end describe AnyTimesMatcher, "#possible_match?" do before do @matcher = AnyTimesMatcher.new end it "always returns true" do @matcher.should be_possible_match(0) @matcher.should be_possible_match(99999) end end describe AnyTimesMatcher, "#matches?" do before do @matcher = AnyTimesMatcher.new end it "always returns true" do @matcher.should be_matches(0) @matcher.should be_matches(99999) end end describe AnyTimesMatcher, "#attempt?" do before do @matcher = AnyTimesMatcher.new end it "always returns true" do @matcher.should be_attempt(0) @matcher.should be_attempt(99999) end end describe AnyTimesMatcher, "#error_message" do before do @matcher = AnyTimesMatcher.new end it "has an error message" do @matcher.error_message(2).should == ( "Called 2 times.\nExpected any number of times." ) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems