Sha256: c0e1cd76dbed3d8c69c1682ab21784b194b03979399796caff4f09582b43fe54
Contents?: true
Size: 1.46 KB
Versions: 6
Compression:
Stored size: 1.46 KB
Contents
dir = File.dirname(__FILE__) require "#{dir}/../../example_helper" module RR module Expectations describe ArgumentEqualityError, "#exact_match? with is_a argument" do before do @expectation = ArgumentEqualityError.new(boolean) end it "returns true when passed in an IsA module" do @expectation.should be_exact_match(WildcardMatchers::Boolean.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(true) @expectation.should_not be_exact_match() end end describe ArgumentEqualityError, "#wildcard_match? with is_a Boolean argument" do before do @expectation = ArgumentEqualityError.new(boolean) end it "returns true when passed a Boolean" do @expectation.should be_wildcard_match(true) @expectation.should be_wildcard_match(false) end it "returns false when not passed a Boolean" do @expectation.should_not be_wildcard_match(:not_a_boolean) end it "returns true when an exact match" do @expectation.should be_wildcard_match(boolean) end it "returns false when not passed correct number of arguments" do @expectation.should_not be_wildcard_match() @expectation.should_not be_wildcard_match(true, false) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems