Skip to content

Commit 4c47522

Browse files
committed
Add test for names
1 parent 5af0683 commit 4c47522

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/testthat/test-describe.R

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ test_that("has to have a valid description for the block", {
5252
})
5353
})
5454

55+
test_that("names are concatenated", {
56+
reporter <- SilentReporter$new()
57+
with_reporter(reporter, {
58+
describe("a", {
59+
describe("b", {
60+
it("c", {
61+
it("d", {
62+
expect_true(TRUE)
63+
})
64+
})
65+
})
66+
})
67+
})
68+
expectation <- reporter$expectations()[[1]]
69+
expect_equal(expectation$test, "a / b / c / d")
70+
})
71+
5572
test_that("skips are scoped to describe/it", {
5673
reporter <- SilentReporter$new()
5774
with_reporter(reporter, {

0 commit comments

Comments
 (0)