mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Test case to ensure runtime type is reported
This commit is contained in:
parent
cc4ab9756a
commit
e234ac2f31
1 changed files with 8 additions and 0 deletions
|
@ -74,6 +74,14 @@ describe Spectator::Matchers::TypeMatcher do
|
||||||
match_data = matcher.match(partial)
|
match_data = matcher.match(partial)
|
||||||
match_data_value_sans_prefix(match_data.values, :actual)[:value].should eq(typeof(value))
|
match_data_value_sans_prefix(match_data.values, :actual)[:value].should eq(typeof(value))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "is the runtime type name" do
|
||||||
|
value = 42.as(Int32?)
|
||||||
|
partial = new_partial(value)
|
||||||
|
matcher = Spectator::Matchers::TypeMatcher(String).new
|
||||||
|
match_data = matcher.match(partial)
|
||||||
|
match_data_value_sans_prefix(match_data.values, :actual)[:value].should eq(value.class)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue