<commit_before>/*
   Copyright 2017 <NAME>.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package batect.journeytests

import com.natpryce.hamkrest.assertion.assertThat
import com.natpryce.hamkrest.containsSubstring
import com.natpryce.hamkrest.equalTo
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on

object HelpJourneyTest : Spek({
    given("the application") {
        on("requesting help for the application") {
            val runner = ApplicationRunner("", listOf("help"))
            val result = runner.run()

            it("prints the help header") {
                assertThat(result.output, containsSubstring("Usage: batect [COMMON OPTIONS] COMMAND [COMMAND OPTIONS]"))
            }

            it("returns a non-zero exit code") {
                assertThat(result.exitCode, !equalTo(0))
            }
        }

        on("requesting help for a command") {
            val runner = ApplicationRunner("", listOf("help", "run"))
            val result = runner.run()

            it("prints the help header") {
                assertThat(result.output, containsSubstring("Usage: batect [COMMON OPTIONS] run TASK"))
            }

            it("prints a description of the command") {
                assertThat(result.output, containsSubstring("Run a task."))
            }

            it("returns a non-zero exit code") {
                assertThat(result.exitCode, !equalTo(0))
            }
        }
    }
})
<commit_msg>Fix journey test broken in last commit.<commit_after>/*
   Copyright 2017 <NAME>.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package batect.journeytests

import com.natpryce.hamkrest.assertion.assertThat
import com.natpryce.hamkrest.containsSubstring
import com.natpryce.hamkrest.equalTo
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on

object HelpJourneyTest : Spek({
    given("the application") {
        on("requesting help for the application") {
            val runner = ApplicationRunner("", listOf("help"))
            val result = runner.run()

            it("prints the help header") {
                assertThat(result.output, containsSubstring("Usage: batect [COMMON OPTIONS] COMMAND [COMMAND OPTIONS]"))
            }

            it("returns a non-zero exit code") {
                assertThat(result.exitCode, !equalTo(0))
            }
        }

        on("requesting help for a command") {
            val runner = ApplicationRunner("", listOf("help", "run"))
            val result = runner.run()

            it("prints the help header") {
                assertThat(result.output, containsSubstring("Usage: batect [COMMON OPTIONS] run [OPTIONS] TASK"))
            }

            it("prints a description of the command") {
                assertThat(result.output, containsSubstring("Run a task."))
            }

            it("returns a non-zero exit code") {
                assertThat(result.exitCode, !equalTo(0))
            }
        }
    }
})

{'fraction_non_alphanumeric': 0.09575494452484322, 'fraction_numerical': 0.00482392667631452, 'mean_word_length': 2.5054945054945055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3749083', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1122, 'n_words': 357}