mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Sub-types should be not match
This commit is contained in:
parent
028065ad26
commit
aa94ec0e33
1 changed files with 9 additions and 0 deletions
|
@ -29,6 +29,15 @@ describe Spectator::Matchers::TypeMatcher do
|
||||||
end
|
end
|
||||||
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
|
context "with a mix-in" do
|
||||||
it "is true" do
|
it "is true" do
|
||||||
value = %i[a b c]
|
value = %i[a b c]
|
||||||
|
|
Loading…
Reference in a new issue