mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Sanity check on expectations
This commit is contained in:
parent
67e192edc6
commit
36071fcdbf
1 changed files with 6 additions and 2 deletions
|
@ -23,11 +23,15 @@ def new_expectation(expected : ExpectedType = 123, actual : ActualType = 123) fo
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_met_expectation(value : T = 123) forall T
|
def new_met_expectation(value : T = 123) forall T
|
||||||
new_expectation(value, value)
|
new_expectation(value, value).tap do |expectation|
|
||||||
|
expectation.satisfied?.should be_true # Sanity check.
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_unmet_expectation(expected : ExpectedType = 123, actual : ActualType = 456) forall ExpectedType, ActualType
|
def new_unmet_expectation(expected : ExpectedType = 123, actual : ActualType = 456) forall ExpectedType, ActualType
|
||||||
new_expectation(expected, actual)
|
new_expectation(expected, actual).tap do |expectation|
|
||||||
|
expectation.satisfied?.should be_false # Sanity check.
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_successful_result
|
def new_successful_result
|
||||||
|
|
Loading…
Reference in a new issue