mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add should
keywords to examples
Allows short-hand like: it { should be_empty }
This commit is contained in:
parent
8381c08b05
commit
b1984b343a
2 changed files with 19 additions and 4 deletions
|
@ -184,6 +184,22 @@ module Spectator
|
|||
is_expected.to_not eq({{expected}})
|
||||
end
|
||||
|
||||
macro should(matcher)
|
||||
is_expected.to({{matcher}})
|
||||
end
|
||||
|
||||
macro should_not(matcher)
|
||||
is_expected.to_not({{matcher}})
|
||||
end
|
||||
|
||||
macro should_eventuall(matcher)
|
||||
is_expected.to_eventually({{matcher}})
|
||||
end
|
||||
|
||||
macro should_never(matcher)
|
||||
is_expected.to_never({{matcher}})
|
||||
end
|
||||
|
||||
# Immediately fail the current test.
|
||||
# A reason can be passed,
|
||||
# which is reported in the output.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue