mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add spec for ExpectationFailed
This commit is contained in:
parent
b8ee29ab0e
commit
7517042195
1 changed files with 19 additions and 0 deletions
19
spec/expectation_failed_spec.cr
Normal file
19
spec/expectation_failed_spec.cr
Normal file
|
@ -0,0 +1,19 @@
|
|||
require "./spec_helper"
|
||||
|
||||
describe Spectator::ExpectationFailed do
|
||||
describe "#expectation" do
|
||||
it "contains the expected value" do
|
||||
expectation = new_unsatisfied_expectation
|
||||
error = Spectator::ExpectationFailed.new(expectation)
|
||||
error.expectation.should eq(expectation)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#message" do
|
||||
it "is the same as the expectation's #actual_message" do
|
||||
expectation = new_unsatisfied_expectation
|
||||
error = Spectator::ExpectationFailed.new(expectation)
|
||||
error.message.should eq(expectation.actual_message)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue