Sha256: 680c089a352876f1710578b38e07f6c503a2d3fcce004595159e3e044d562d4b
Contents?: true
Size: 1.17 KB
Versions: 25
Compression:
Stored size: 1.17 KB
Contents
require "examples/example_helper" module RR module Expectations describe ArgumentEqualityExpectation, "#exact_match? with anything argument" do before do @expectation = ArgumentEqualityExpectation.new(anything) end it "returns true when passed in an Anything module" do @expectation.should be_exact_match(WildcardMatchers::Anything.new) end it "returns false otherwise" do @expectation.should_not be_exact_match("hello") @expectation.should_not be_exact_match(:hello) @expectation.should_not be_exact_match(1) @expectation.should_not be_exact_match(nil) @expectation.should_not be_exact_match() end end describe ArgumentEqualityExpectation, "#wildcard_match? with is_a String argument" do before do @expectation = ArgumentEqualityExpectation.new(anything) end it "returns true when passed correct number of arguments" do @expectation.should be_wildcard_match(Object.new) end it "returns false when not passed correct number of arguments" do @expectation.should_not be_wildcard_match() @expectation.should_not be_wildcard_match(Object.new, Object.new) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems