mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Post-conditions work, pre-conditions don't
This commit is contained in:
parent
c6c80ccb8e
commit
f01fb2df4b
1 changed files with 6 additions and 4 deletions
|
@ -3,15 +3,17 @@ require "./src/spectator"
|
|||
Spectator.describe Array do
|
||||
let(array) { %i[a b c] }
|
||||
let(original_array) { array.dup }
|
||||
# pre_condition { is_expected.to_not be_nil } # 1
|
||||
post_condition { expect(array).to match_array(original_array) } # 5
|
||||
|
||||
subject { array.map(&.to_s) }
|
||||
|
||||
describe "#foo" do
|
||||
# pre_condition { expect(subject.first).to eq("a") } # 2
|
||||
post_condition { expect(array.size).to eq(26) } # 4
|
||||
|
||||
it "does a cool thing" do
|
||||
is_expected.to_not be_nil
|
||||
expect(subject.first).to eq("a")
|
||||
expect(array.size).to eq(26)
|
||||
expect(array).to match_array(original_array)
|
||||
# 3
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue