mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add tests for Result#call implementations
This commit is contained in:
parent
75f9a5838b
commit
6a8d447570
5 changed files with 70 additions and 0 deletions
|
@ -5,6 +5,21 @@ def new_pending_result(example : Spectator::Example? = nil)
|
|||
end
|
||||
|
||||
describe Spectator::PendingResult do
|
||||
describe "#call" do
|
||||
it "invokes #pending on an instance" do
|
||||
spy = ResultCallSpy.new
|
||||
new_pending_result.call(spy)
|
||||
spy.pending?.should be_truthy
|
||||
end
|
||||
|
||||
it "passes itself" do
|
||||
spy = ResultCallSpy.new
|
||||
result = new_pending_result
|
||||
result.call(spy)
|
||||
spy.pending.should eq(result)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#example" do
|
||||
it "is the expected value" do
|
||||
example = PassingExample.create
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue