Skip to content

Commit

Permalink
docs: fix EnabledCondition example (interface, not class) (#3810)
Browse files Browse the repository at this point in the history
Relates to #3259 but applied to all doc versions

<!-- 
If this PR updates documentation, please update all relevant versions of
the docs, see:
https://github.com/kotest/kotest/tree/master/documentation/versioned_docs
The documentation at
https://github.com/kotest/kotest/tree/master/documentation/docs is the
documentation for the next minor or major version _TO BE RELEASED_
-->

Signed-off-by: Jonathan Hult <Jonathan@JonathanHult.com>
  • Loading branch information
jhult committed Dec 21, 2023
1 parent 7bd9ef0 commit 8fa47fd
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion documentation/docs/framework/conditional/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to determine if a spec is enabled. Note that implementations must have a zero ar
For example, we may wish to only execute tests containing the name "Linux" when run on a Linux machine.

```kotlin
class LinuxOnlyCondition : EnabledCondition() {
class LinuxOnlyCondition : EnabledCondition {
override fun enabled(kclass: KClass<out Spec>): Boolean = when {
kclass.simpleName?.contains("Linux") == true -> IS_OS_LINUX
else -> true // non Linux tests always run
Expand Down

0 comments on commit 8fa47fd

Please sign in to comment.