From 30602663fe87399e8572a90ca7464fc174fb4d31 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Tue, 20 Dec 2022 20:12:58 -0700 Subject: [PATCH] Add tests for interpolated labels The context label test intentionally fails. This functionality still needs to be implemented. --- spec/features/interpolated_label_spec.cr | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 spec/features/interpolated_label_spec.cr diff --git a/spec/features/interpolated_label_spec.cr b/spec/features/interpolated_label_spec.cr new file mode 100644 index 0000000..9c78c15 --- /dev/null +++ b/spec/features/interpolated_label_spec.cr @@ -0,0 +1,22 @@ +require "../spec_helper" + +Spectator.describe "Interpolated Label" do + let(foo) { "example" } + let(bar) { "context" } + + it "interpolates #{foo} labels" do |example| + expect(example.name).to eq("interpolates example labels") + end + + context "within a \#{bar}" do + let(foo) { "multiple" } + + it "interpolates context labels" do |example| + expect(example.group.name).to eq("within a context") + end + + it "interpolates #{foo} levels" do |example| + expect(example.name).to eq("interpolates multiple levels") + end + end +end