Skip to content

Commit

Permalink
Improve documentation (#2353)
Browse files Browse the repository at this point in the history
* Use HTTPS for links

* Improve `SystemUtils` links in documentation

* Consistently use spaces for code block indentation of documentation

* Improve search.maven.org links in documentation

Link to respective artifacts instead of using link for regular text search.
  • Loading branch information
Marcono1234 committed Jul 11, 2021
1 parent bffcd20 commit f4d1f78
Show file tree
Hide file tree
Showing 29 changed files with 170 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,7 +13,7 @@
*.iml
.idea

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
# virtual machine crash logs, see https://www.java.com/en/download/help/error_hotspot.html
hs_err_pid*
out/

Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -2,11 +2,11 @@
==========

[![Build Status](https://github.com/kotest/kotest/workflows/build/badge.svg)](https://github.com/kotest/kotest/actions)
[<img src="https://img.shields.io/maven-central/v/io.kotest/kotest-framework-api-jvm.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest)
[<img src="https://img.shields.io/maven-central/v/io.kotest/kotest-framework-api-jvm.svg?label=latest%20release"/>](https://search.maven.org/search?q=g:io.kotest%20OR%20g:io.kotest.extensions)
![intellij-badge](https://img.shields.io/jetbrains/plugin/v/14080-kotest?label=intellij%20plugin)
![GitHub](https://img.shields.io/github/license/kotest/kotest)
[![kotest @ kotlinlang.slack.com](https://img.shields.io/static/v1?label=kotlinlang&message=kotest&color=blue&logo=slack)](https://kotlinlang.slack.com/archives/CT0G9SD7Z)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/kotest/kotest.svg)](http://isitmaintained.com/project/kotest/kotest "Average time to resolve an issue")
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/kotest/kotest.svg)](https://isitmaintained.com/project/kotest/kotest "Average time to resolve an issue")
[<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest/kotest-framework-api.svg?label=latest%20snapshot"/>](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/)

__Kotest is a flexible and comprehensive testing tool for [Kotlin](https://kotlinlang.org/) with multiplatform support.__
Expand All @@ -16,8 +16,8 @@ Looking to upgrade? - see the [changelog](https://kotest.io/docs/changelog.html)

Community
---------
* [Kotest channel](https://kotlinlang.slack.com/messages/kotest) in the Kotlin Slack (get an invite [here](http://slack.kotlinlang.org/))
* [Stack Overflow](http://stackoverflow.com/questions/tagged/kotest) (don't forget to use the tag "kotest".)
* [Kotest channel](https://kotlinlang.slack.com/messages/kotest) in the Kotlin Slack (get an invite [here](https://slack.kotlinlang.org/))
* [Stack Overflow](https://stackoverflow.com/questions/tagged/kotest) (don't forget to use the tag "kotest".)
* [Contribute](https://github.com/kotest/kotest/wiki/contribute)
* [Blogs and articles](https://kotest.io/docs/blogs/).

Expand Down
2 changes: 1 addition & 1 deletion blog/release_4.2.md
Expand Up @@ -28,7 +28,7 @@ The core assertions library is now published for ios, watchos and tvos. This bri

### Kotlinx Date/Time Matchers

A new [assertions module](https://search.maven.org/search?q=kotest-assertions-kotlinx-time) has been created `kotest-assertions-kotlinx-time`
A new [assertions module](https://search.maven.org/artifact/io.kotest/kotest-assertions-kotlinx-time) has been created `kotest-assertions-kotlinx-time`
which contains matchers for the new [Kotlinx Datetime library](https://github.com/Kotlin/kotlinx-datetime).
Since the datetime library has an _incubating_ status, this assertions module may require breaking changes in the future if the date/time API mandates it.

Expand Down
2 changes: 1 addition & 1 deletion doc/reference.md
@@ -1,7 +1,7 @@
Kotest
==========

[<img src="https://img.shields.io/maven-central/v/io.kotest/kotest-core.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest) [![GitHub license](https://img.shields.io/github/license/kotest/kotest.svg)]()
[<img src="https://img.shields.io/maven-central/v/io.kotest/kotest-core.svg?label=latest%20release"/>](https://search.maven.org/search?q=g:io.kotest) [![GitHub license](https://img.shields.io/github/license/kotest/kotest.svg)]()

This version of the document is for the 4.x releases.
For version 3.3 see [here](reference_3.3.md)
Expand Down
4 changes: 2 additions & 2 deletions doc/reference_3.1.md
@@ -1,7 +1,7 @@
KotlinTest
==========

[<img src="https://img.shields.io/maven-central/v/io.kotlintest/kotlintest-core.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotlintest) [![GitHub license](https://img.shields.io/github/license/kotlintest/kotlintest.svg)]()
[<img src="https://img.shields.io/maven-central/v/io.kotlintest/kotlintest-core.svg?label=latest%20release"/>](https://search.maven.org/search?q=g:io.kotlintest) [![GitHub license](https://img.shields.io/github/license/kotlintest/kotlintest.svg)]()

This version of the document is aimed at version 3.1

Expand Down Expand Up @@ -772,7 +772,7 @@ If you're looking for something like JUnit's `@Ignore`, this is for you.

You can use the same mechanism to run tests only under certain conditions.
For example you could run certain tests only on Linux systems using
[SystemUtils](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_WINDOWS).IS_OS_LINUX from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).
[`SystemUtils.IS_OS_LINUX`](https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_LINUX) from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).

```kotlin
"should do something".config(enabled = IS_OS_LINUX) {
Expand Down
4 changes: 2 additions & 2 deletions doc/reference_3.2.md
@@ -1,7 +1,7 @@
KotlinTest
==========

[<img src="https://img.shields.io/maven-central/v/io.kotlintest/kotlintest-core.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotlintest) [![GitHub license](https://img.shields.io/github/license/kotlintest/kotlintest.svg)]()
[<img src="https://img.shields.io/maven-central/v/io.kotlintest/kotlintest-core.svg?label=latest%20release"/>](https://search.maven.org/search?q=g:io.kotlintest) [![GitHub license](https://img.shields.io/github/license/kotlintest/kotlintest.svg)]()

This version of the document is for version 3.2+.
For docs for earlier versions see [here](reference_3.1.md)
Expand Down Expand Up @@ -777,7 +777,7 @@ If you're looking for something like JUnit's `@Ignore`, this is for you.

You can use the same mechanism to run tests only under certain conditions.
For example you could run certain tests only on Linux systems using
[SystemUtils](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_WINDOWS).IS_OS_LINUX from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).
[`SystemUtils.IS_OS_LINUX`](https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_LINUX) from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).

```kotlin
"should do something".config(enabled = IS_OS_LINUX) {
Expand Down
2 changes: 1 addition & 1 deletion doc/reference_3.3.md
Expand Up @@ -803,7 +803,7 @@ If you're looking for something like JUnit's `@Ignore`, this is for you.

You can use the same mechanism to run tests only under certain conditions.
For example you could run certain tests only on Linux systems using
[SystemUtils](http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_WINDOWS).IS_OS_LINUX from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).
[`SystemUtils.IS_OS_LINUX`](https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#IS_OS_LINUX) from [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/).

```kotlin
"should do something".config(enabled = IS_OS_LINUX) {
Expand Down
130 changes: 65 additions & 65 deletions doc/styles.md
Expand Up @@ -30,10 +30,10 @@ and then the test itself as a lambda. If in doubt, this is the style to use.

```kotlin
class MyTests : FunSpec({
test("String length should return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
test("String length should return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
})
```

Expand All @@ -47,9 +47,9 @@ class MyTests : DescribeSpec({
}
}
xcontext("this block is disabled") {
test("disabled by inheritance from the parent") {
// test here
}
test("disabled by inheritance from the parent") {
// test here
}
}
})
```
Expand All @@ -62,19 +62,19 @@ class MyTests : DescribeSpec({

```kotlin
class MyTests : StringSpec({
"strings.length should return size of string" {
"hello".length shouldBe 5
}
"strings.length should return size of string" {
"hello".length shouldBe 5
}
})
```

Adding config to the test.

```kotlin
class MyTests : StringSpec({
"strings.length should return size of string".config(enabled = false, invocations = 3) {
"hello".length shouldBe 5
}
"strings.length should return size of string".config(enabled = false, invocations = 3) {
"hello".length shouldBe 5
}
})
```

Expand All @@ -86,10 +86,10 @@ Note that this is the only Spec that does not support nesting.

```kotlin
class MyTests : ShouldSpec({
should("return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
should("return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
})
```

Expand All @@ -98,12 +98,12 @@ Tests can be nested in one or more context blocks as well:

```kotlin
class MyTests : ShouldSpec({
context("String.length") {
should("return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
}
context("String.length") {
should("return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
}
})
```

Expand All @@ -117,9 +117,9 @@ class MyTests : ShouldSpec({
}
}
xcontext("this block is disabled") {
should("disabled by inheritance from the parent") {
// test here
}
should("disabled by inheritance from the parent") {
// test here
}
}
})
```
Expand All @@ -145,9 +145,9 @@ class MyTests : DescribeSpec({
}

describe("for the opposite team") {
it("Should negate one score") {
// test here
}
it("Should negate one score") {
// test here
}
}
}
})
Expand All @@ -163,9 +163,9 @@ class MyTests : DescribeSpec({
}
}
xdescribe("this block is disabled") {
it("disabled by inheritance from the parent") {
// test here
}
it("disabled by inheritance from the parent") {
// test here
}
}
})
```
Expand Down Expand Up @@ -241,12 +241,12 @@ class MyTests : DescribeSpec({

```kotlin
class MyTests : WordSpec({
"String.length" should {
"return the length of the string" {
"sammy".length shouldBe 5
"".length shouldBe 0
}
}
"String.length" should {
"return the length of the string" {
"sammy".length shouldBe 5
"".length shouldBe 0
}
}
})
```

Expand All @@ -255,18 +255,18 @@ in Kotlin, we must use backticks or the uppercase variant.

```kotlin
class MyTests : WordSpec({
"Hello" When {
"asked for length" should {
"return 5" {
"Hello".length shouldBe 5
}
}
"appended to Bob" should {
"return Hello Bob" {
"Hello " + "Bob" shouldBe "Hello Bob"
}
}
}
"Hello" When {
"asked for length" should {
"return 5" {
"Hello".length shouldBe 5
}
}
"appended to Bob" should {
"return Hello Bob" {
"Hello " + "Bob" shouldBe "Hello Bob"
}
}
}
})
```

Expand Down Expand Up @@ -296,19 +296,19 @@ class MyTests : FreeSpec({

### Feature Spec

`FeatureSpec` allows you to use `feature` and `scenario`, which will be familiar to those who have used [cucumber](http://docs.cucumber.io/gherkin/reference/).
`FeatureSpec` allows you to use `feature` and `scenario`, which will be familiar to those who have used [cucumber](https://cucumber.io/docs/gherkin/reference/).
Although not intended to be exactly the same as cucumber, the keywords mimic the style.

```kotlin
class MyTests : FeatureSpec({
feature("the can of coke") {
scenario("should be fizzy when I shake it") {
// test here
}
scenario("and should be tasty") {
// test here
}
}
feature("the can of coke") {
scenario("should be fizzy when I shake it") {
// test here
}
scenario("and should be tasty") {
// test here
}
}
})
```

Expand All @@ -322,9 +322,9 @@ class MyTests : FeatureSpec({
}
}
xfeature("this block is disabled") {
scenario("disabled by inheritance from the parent") {
// test here
}
scenario("disabled by inheritance from the parent") {
// test here
}
}
})
```
Expand Down Expand Up @@ -366,9 +366,9 @@ class MyTests : DescribeSpec({
}
}
xcontext("this block is disabled") {
expect("disabled by inheritance from the parent") {
// test here
}
expect("disabled by inheritance from the parent") {
// test here
}
}
})
```
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/assertions/index.md
Expand Up @@ -15,7 +15,7 @@ the comprehensive assertion / matchers support. These can be used with the [Kote
or with another test framework like JUnit or Spock.


[![version badge](https://img.shields.io/maven-central/v/io.kotest/kotest-assertions-core-jvm.svg?label=release)](https://search.maven.org/search?q=kotest)
[![version badge](https://img.shields.io/maven-central/v/io.kotest/kotest-assertions-core-jvm.svg?label=release)](https://search.maven.org/search?q=g:io.kotest)
[![version badge](https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest/kotest-assertions-core-jvm.svg?label=snapshot)](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/)

The core functionality of the assertion modules are functions that test state. Kotest calls these types of state
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/blog/release_4.2.md
Expand Up @@ -28,7 +28,7 @@ The core assertions library is now published for ios, watchos and tvos. This bri

### Kotlinx Date/Time Matchers

A new [assertions module](https://search.maven.org/search?q=kotest-assertions-kotlinx-time) has been created `kotest-assertions-kotlinx-time`
A new [assertions module](https://search.maven.org/artifact/io.kotest/kotest-assertions-kotlinx-time) has been created `kotest-assertions-kotlinx-time`
which contains matchers for the new [Kotlinx Datetime library](https://github.com/Kotlin/kotlinx-datetime).
Since the datetime library has an _incubating_ status, this assertions module may require breaking changes in the future if the date/time API mandates it.

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/changelog.md
Expand Up @@ -947,7 +947,7 @@ uri should haveFragment("results")

* **Arrow matcher module**

A new module has been added which includes matchers for [Arrow](http://arrow-kt.io) - the popular and awesome
A new module has been added which includes matchers for [Arrow](https://arrow-kt.io/) - the popular and awesome
functional programming library for Kotlin. To include this module add `kotlintest-assertions-arrow` to your build.

The included matchers are:
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/extensions/allure.md
Expand Up @@ -20,7 +20,7 @@ To start, add the below dependency to your Gradle build file.
io.kotest.extensions:kotest-extensions-allure:${kotest.version}
```

[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-allure.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest-extensions-allure)
[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-allure.svg?label=latest%20release"/>](https://search.maven.org/artifact/io.kotest.extensions/kotest-extensions-allure)
[<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest.extensions/kotest-extensions-allure.svg?label=latest%20snapshot"/>](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/extensions/kotest-extensions-allure/)


Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/extensions/kafka.md
Expand Up @@ -11,7 +11,7 @@ where using the kafka docker images are an issue.
To use this extension add the `io.kotest.extensions:kotest-extensions-embedded-kafka` module to your test compile path.


[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-embedded-kafka.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest-extensions-embedded-kafka)
[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-embedded-kafka.svg?label=latest%20release"/>](https://search.maven.org/artifact/io.kotest.extensions/kotest-extensions-embedded-kafka)
[<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest.extensions/kotest-extensions-embedded-kafka.svg?label=latest%20snapshot"/>](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/extensions/kotest-extensions-embedded-kafka/)


Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/extensions/koin.md
Expand Up @@ -14,7 +14,7 @@ The [Koin DI Framework](https://insert-koin.io/) can be used with Kotest through
To add the listener to your project, add the dependency to your project:


[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-koin.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest-extensions-koin)
[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-extensions-koin.svg?label=latest%20release"/>](https://search.maven.org/artifact/io.kotest.extensions/kotest-extensions-koin)
[<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest.extensions/kotest-extensions-koin.svg?label=latest%20snapshot"/>](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/extensions/kotest-extensions-koin/)


Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/extensions/ktor.md
Expand Up @@ -16,7 +16,7 @@ To add Ktor matchers, add the following dependency to your project
io.kotest.extensions:kotest-assertions-ktor:${version}
```

[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-assertions-ktor.svg?label=latest%20release"/>](http://search.maven.org/#search|ga|1|kotest-assertions-ktor)
[<img src="https://img.shields.io/maven-central/v/io.kotest.extensions/kotest-assertions-ktor.svg?label=latest%20release"/>](https://search.maven.org/artifact/io.kotest.extensions/kotest-assertions-ktor)
[<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/io.kotest.extensions/kotest-assertions-ktor.svg?label=latest%20snapshot"/>](https://oss.sonatype.org/content/repositories/snapshots/io/kotest/extensions/kotest-assertions-ktor/)


Expand Down

0 comments on commit f4d1f78

Please sign in to comment.