mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add specs of snippets from docs
This commit is contained in:
parent
0322d5bd28
commit
5c24d606dd
7 changed files with 382 additions and 0 deletions
23
spec/docs/getting_started_spec.cr
Normal file
23
spec/docs/getting_started_spec.cr
Normal file
|
@ -0,0 +1,23 @@
|
|||
require "../spec_helper"
|
||||
|
||||
Spectator.describe String do
|
||||
subject { "foo" }
|
||||
|
||||
describe "#==" do
|
||||
context "with the same value" do
|
||||
let(value) { subject.dup }
|
||||
|
||||
it "is true" do
|
||||
is_expected.to eq(value)
|
||||
end
|
||||
end
|
||||
|
||||
context "with a different value" do
|
||||
let(value) { "bar" }
|
||||
|
||||
it "is false" do
|
||||
is_expected.to_not eq(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue