Skip to content

Commit b0bc10f

Browse files
committed
test(composer): Avoid relying on the current test directory
Emphasize that the `File` argument does not matter for the test by using an arbitrary value instead. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 4dc2992 commit b0bc10f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/package-managers/composer/src/funTest/kotlin/ComposerFunTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ import io.kotest.matchers.collections.shouldHaveSize
2626
import io.kotest.matchers.should
2727
import io.kotest.matchers.shouldBe
2828
import io.kotest.matchers.string.haveSubstring
29+
import io.kotest.property.Arb
30+
import io.kotest.property.arbitrary.file
31+
import io.kotest.property.arbitrary.single
2932

3033
import java.io.File
3134

@@ -39,7 +42,7 @@ import org.ossreviewtoolkit.utils.test.matchExpectedResult
3942
class ComposerFunTest : StringSpec({
4043
"Project files from vendor directories are ignored" {
4144
val projectFiles = ComposerFactory.create().mapDefinitionFiles(
42-
File("."),
45+
Arb.file().single(),
4346
listOf(
4447
"projectA/composer.json",
4548
"projectA/vendor/dependency1/composer.json",

0 commit comments

Comments
 (0)