shard-spectator/spec/pending_result_spec.cr
2019-02-12 16:36:06 -07:00

39 lines
841 B
Crystal

require "./spec_helper"
def new_pending_result(example : Spectator::Example? = nil)
Spectator::PendingResult.new(example || FailingExample.create)
end
describe Spectator::PendingResult do
describe "#pending?" do
it "is true" do
new_pending_result.pending?.should be_true
end
end
describe "#passed?" do
it "is false" do
new_pending_result.passed?.should be_false
end
end
describe "#failed?" do
it "is false" do
new_pending_result.failed?.should be_false
end
end
describe "#errored?" do
it "is false" do
new_pending_result.errored?.should be_false
end
end
describe "#example" do
it "is the expected value" do
example = PassingExample.create
result = new_pending_result(example: example)
result.example.should eq(example)
end
end
end