Sha256: f787d85e300db3d71e80c755505e75c70aab16351a8a579e91ddc3851a3127d8
Contents?: true
Size: 1.36 KB
Versions: 11
Compression:
Stored size: 1.36 KB
Contents
require "spec/spec_helper" module RR module Expectations describe ArgumentEqualityExpectation, "with numeric argument" do attr_reader :expectation before do @expectation = ArgumentEqualityExpectation.new(numeric) end describe "#exact_match?" do it "returns true when passed in an IsA module" do expectation.should be_exact_match(WildcardMatchers::Numeric.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 "#wildcard_match?" do it "returns true when passed a Numeric" do expectation.should be_wildcard_match(99) end it "returns false when not passed a Numeric" do expectation.should_not be_wildcard_match(:not_a_numeric) end it "returns true when an exact match" do expectation.should be_wildcard_match(numeric) end it "returns false when not passed correct number of arguments" do expectation.should_not be_wildcard_match() expectation.should_not be_wildcard_match(1, 2) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems