diff --git a/test_hooks.cr b/test_hooks.cr new file mode 100644 index 0000000..227fa7c --- /dev/null +++ b/test_hooks.cr @@ -0,0 +1,19 @@ +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 + # 3 + end + end +end