Skip to content

Commit

Permalink
disable BasicProjectIntegrationTest on Windows #10
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Feb 20, 2023
1 parent 4126aaa commit cdbcbde
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dev.adamko.dokkatoo.tests.integration

import dev.adamko.dokkatoo.utils.GradleProjectTest
import dev.adamko.dokkatoo.utils.GradleProjectTest.Companion.projectTestTempDir
import dev.adamko.dokkatoo.utils.NotWindowsCondition
import dev.adamko.dokkatoo.utils.buildGradleKts
import dev.adamko.dokkatoo.utils.copyIntegrationTestProject
import dev.adamko.dokkatoo.utils.findFiles
Expand All @@ -12,6 +13,7 @@ import dev.adamko.dokkatoo.utils.shouldNotContainAnyOf
import dev.adamko.dokkatoo.utils.sideBySide
import dev.adamko.dokkatoo.utils.toTreeString
import dev.adamko.dokkatoo.utils.withEnvironment
import io.kotest.core.annotation.EnabledIf
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.file.shouldBeAFile
import io.kotest.matchers.file.shouldHaveSameStructureAndContentAs
Expand All @@ -27,7 +29,8 @@ import java.io.File
*
* Runs Dokka & Dokkatoo, and compares the resulting HTML site.
*/
class BasicProjectIntegrationTest : FunSpec({
@EnabledIf(NotWindowsCondition::class) // https://github.com/adamko-dev/dokkatoo/issues/10
class BasicProjectIntegrationTest : FunSpec(funSpec@{

val tempDir = projectTestTempDir.resolve("it/it-basic").toFile()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package dev.adamko.dokkatoo.utils

import io.kotest.core.annotation.EnabledCondition
import io.kotest.core.spec.Spec
import kotlin.reflect.KClass

class NotWindowsCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean =
"win" !in System.getProperty("os.name").toLowerCase()
}

0 comments on commit cdbcbde

Please sign in to comment.