Removing pre- and post-conditions fix the issue

This commit is contained in:
Michael Miller 2019-04-06 12:18:34 -06:00
parent 728477914f
commit c6c80ccb8e

View file

@ -3,17 +3,15 @@ require "./src/spectator"
Spectator.describe Array do Spectator.describe Array do
let(array) { %i[a b c] } let(array) { %i[a b c] }
let(original_array) { array.dup } 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) } subject { array.map(&.to_s) }
describe "#foo" do 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 it "does a cool thing" do
# 3 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)
end end
end end
end end