2022-12-21 03:12:58 +00:00
|
|
|
require "../spec_helper"
|
|
|
|
|
2022-12-21 03:52:01 +00:00
|
|
|
Spectator.describe "Interpolated Label", :smoke do
|
2022-12-21 03:12:58 +00:00
|
|
|
let(foo) { "example" }
|
|
|
|
let(bar) { "context" }
|
|
|
|
|
|
|
|
it "interpolates #{foo} labels" do |example|
|
|
|
|
expect(example.name).to eq("interpolates example labels")
|
|
|
|
end
|
|
|
|
|
2022-12-21 03:32:40 +00:00
|
|
|
context "within a #{bar}" do
|
2022-12-21 03:12:58 +00:00
|
|
|
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
|