Sub-types should be not match

This commit is contained in:
Michael Miller 2019-01-26 16:44:46 -07:00
parent 028065ad26
commit aa94ec0e33
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,15 @@ describe Spectator::Matchers::TypeMatcher do
end
end
context "with a child type" do
it "is false" do
value = Exception.new("foobar")
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
matcher = Spectator::Matchers::TypeMatcher(ArgumentError).new
matcher.match?(partial).should be_false
end
end
context "with a mix-in" do
it "is true" do
value = %i[a b c]