mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add methods to force failure
This commit is contained in:
parent
686304f31d
commit
532a314441
1 changed files with 9 additions and 0 deletions
|
@ -11,5 +11,14 @@ module Spectator::DSL
|
||||||
macro expect(actual)
|
macro expect(actual)
|
||||||
::Spectator::Expectations::ValueExpectationPartial.new({{actual.stringify}}, {{actual}})
|
::Spectator::Expectations::ValueExpectationPartial.new({{actual.stringify}}, {{actual}})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def fail(reason : String)
|
||||||
|
raise ExampleFailed.new(reason)
|
||||||
|
end
|
||||||
|
|
||||||
|
@[AlwaysInline]
|
||||||
|
def fail
|
||||||
|
fail("Example failed")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue