mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Some initial specs for expectation partials
This commit is contained in:
parent
df36331132
commit
3196b724bf
2 changed files with 40 additions and 9 deletions
40
spec/expectations/value_expectation_partial_spec.cr
Normal file
40
spec/expectations/value_expectation_partial_spec.cr
Normal file
|
@ -0,0 +1,40 @@
|
|||
require "../spec_helper"
|
||||
|
||||
describe Spectator::Expectations::ValueExpectationPartial do
|
||||
describe "#actual" do
|
||||
it "contains the value passed to the constructor" do
|
||||
actual = 777
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(actual.to_s, actual)
|
||||
partial.actual.should eq(actual)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#label" do
|
||||
context "with a non-empty string" do
|
||||
it "contains the value passed to the constructor" do
|
||||
actual = 777
|
||||
label = "lucky"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(label, actual)
|
||||
partial.label.should eq(label)
|
||||
end
|
||||
end
|
||||
|
||||
context "with an empty string" do
|
||||
it "contains a stringified version of #actual" do
|
||||
actual = 777
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new("", actual)
|
||||
partial.label.should eq(actual.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#to" do
|
||||
|
||||
end
|
||||
|
||||
{% for method in [:to_not, :not_to] %}
|
||||
describe "{{method.id}}" do
|
||||
|
||||
end
|
||||
{% end %}
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
require "./spec_helper"
|
||||
|
||||
describe Spectator do
|
||||
# TODO: Write tests
|
||||
|
||||
it "works" do
|
||||
false.should eq(true)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue