Skip to content

Commit

Permalink
Fix various typos in documentation and code (#2660)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlvandijk authored Dec 9, 2022
1 parent 1ffabd7 commit 3bb2c57
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Organize import order using Intelij IDEA defaults
# Organize import order using IntelliJ IDEA defaults
# Escaped hashes sort static methods last: https://github.com/diffplug/spotless/issues/306
1=
2=javax
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We appreciate that. Do keep the following in mind:
* When you send a [pull requests](https://help.github.com/articles/using-pull-requests),
please include tests to go along with it.
* Want to paste some code or output? Put \`\`\` on a line above and below your
code/output. See [Github Flavored Markdown](https://help.github.com/articles/github-flavored-markdown)'s
code/output. See [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown)'s
*Fenced Code Blocks* for details.

## Formatting Java
Expand Down
3 changes: 1 addition & 2 deletions cucumber-archetype/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Cucumber Archetype

This is a Maven Archetype for setting up an empty Cucumber project. Used by the
the [10-Minute Cucumber Tutorial](https://docs.cucumber.io/guides/10-minute-tutorial/).
This is a Maven Archetype for setting up an empty Cucumber project. Used by the [10-Minute Cucumber Tutorial](https://docs.cucumber.io/guides/10-minute-tutorial/).

```shell
mvn archetype:generate \
Expand Down
2 changes: 1 addition & 1 deletion cucumber-bom/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bill of Materials

It is fairly common for one project to use more than one cucumber dependency. To
It is fairly common for one project to use more than one Cucumber dependency. To
keep these version in sync a Bill of Materials can be used.

## Usage
Expand Down
4 changes: 2 additions & 2 deletions cucumber-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Cucumber Core
Provides components needed to discover, parse and execute feature files. The
core is designed with a few extension systems and plugin points. You
typically don't depend directly on `cucumber-core` but rather use the different
sub modules together e.g. `cucumber-junit` and `cucumber-java`.
submodules together e.g. `cucumber-junit` and `cucumber-java`.

## Properties, Environment variables, System Options ##

Expand All @@ -14,7 +14,7 @@ Note that the CLI arguments take precedence over all.

Note that the `cucumber-junit-platform-engine` is provided with properties
by the Junit Platform rather than Cucumber. See
[junit-platform-engine Configuration Options](../junit-platform-engine#configuration-options)
[junit-platform-engine Configuration Options](../cucumber-junit-platform-engine#configuration-options)
for more information.

Supported properties are:
Expand Down
6 changes: 4 additions & 2 deletions cucumber-deltaspike/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ public class BellyStepdefs {
private Belly belly;

//normal step code ...
}
```

This ObjectFactory doesn't start or stop any [Scopes](https://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html), so all beans live inside the default scope (Dependent). Now cucumber requested a instance of your stepdefinitions for every step, which means cdi create a new instance for every step and for all injected fields. This behaviour makes it impossible to share a state inside a szenario.

To bybass this, you must annotate your class(es) with `@javax.inject.Singleton`:
1. on stepdefintions: now the ojectfactory will creates only one instance include injected fields per scenario and both injected fields and stepdefinitions can be used to share state inside a scenario.
1. on stepdefintions: now the ojectfactory will create only one instance include injected fields per scenario and both injected fields and stepdefinitions can be used to share state inside a scenario.
2. on any other class: now the objectfactory will create a new instance of your stepdefinitions per step and stepdefinitions can not be used to share state inside a scenario, only the annotated classes can be used to share state inside a scenario

you can also combine both approaches.
Expand All @@ -43,10 +44,11 @@ public class BellyStepdefs {
private Belly belly;

//normal step code ...
}
```
It is not possible to use any other scope than Dependent this means alsoi it is not possible to share a state over two or more scenarios, every scenario start with a clean environment.

To enable this objectfactory add the folling dependency to your classpath:
To enable this objectfactory add the following dependency to your classpath:
```xml
<dependency>
<groupId>io.cucumber</groupId>
Expand Down
2 changes: 1 addition & 1 deletion cucumber-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Notes:

1. When used in combination with Junit 5, Maven Surefire, and/or Failsafe use
version `3.0.0-M5` or later.
2. When used in combination with Junit 5 and InteliJ IDEA failures in before
2. When used in combination with Junit 5 and IntelliJ IDEA failures in before
all and after all hooks do not fail a test run.

### Before / After
Expand Down
2 changes: 1 addition & 1 deletion cucumber-java8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public class StepDefinitions implements En {
public StepDefinitions() {
DataTableType((Map<String, String> entry) -> new User(
entry.get("firstname"),
entry.get("lastname")
entry.get("lastname"),
entry.get("nationality")
));

Expand Down
8 changes: 4 additions & 4 deletions cucumber-junit/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Cucumber JUnit
==============

Use JUnit to execute cucumber scenarios. To use add the `cucumber-junit`
Use JUnit to execute Cucumber scenarios. To use add the `cucumber-junit`
dependency to your pom.xml:

```xml
Expand Down Expand Up @@ -45,16 +45,16 @@ annotations. These will be executed before and
after all scenarios. Using these is not recommended as it limits portability
between different runners; they may not
execute correctly when using the command line, [IntelliJ IDEA](https://www.jetbrains.com/help/idea/cucumber.html), or
[Cucumber-Eclipse](https://github.com/cucumber/cucumber-eclipse). Instead it is
recommended to [use Cucumber's hooks](../java#beforeall--afterall).
[Cucumber-Eclipse](https://github.com/cucumber/cucumber-eclipse). Instead, it is
recommended to [use Cucumber's hooks](../cucumber-java#beforeall--afterall).

## Using other JUnit features ##

The Cucumber runner acts like a suite of a JUnit tests. As such other JUnit
features like custom JUnit
Listeners and Reporters can all be expected to work.

For more information on JUnit, see the [JUnit web site](http://www.junit.org).
For more information on JUnit, see the [JUnit website](http://www.junit.org).

## Assume ##

Expand Down
2 changes: 1 addition & 1 deletion cucumber-testng/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Cucumber TestNG
==============

Use TestNG to execute cucumber scenarios. To use add the `cucumber-testng` dependency to your pom.
Use TestNG to execute Cucumber scenarios. To use add the `cucumber-testng` dependency to your pom.

```xml
<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions datatable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This intended to support:
* automatic conversion by Cucumber

This README explains the way datatables can be converted. To register converters
see [cucumber-java/README.md](../java)
see [cucumber-java/README.md](../cucumber-java)

## Introduction

Expand Down Expand Up @@ -473,9 +473,9 @@ Header: | firstName | | lastName | birthDate |
2a. If the first table cell is blank use the TableCellTransformer to convert the other cells in the column.
2b. Otherwise use the TableEntryTransformer.
2b. Otherwise, use the TableEntryTransformer.
3a. If the first table cell is blank use the TableEntryTransformer to convert the body values.
3b. Otherwise use the TableRowTransformer on all values.
3b. Otherwise, use the TableRowTransformer on all values.
4. Pair up the keys and values from steps 2 and 3.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
<file>${main.basedir}/.spotless/eclipse-formatter-settings.xml</file>
</eclipse>
<importOrder>
<file>${main.basedir}/.spotless/intelij-idea.importorder</file>
<file>${main.basedir}/.spotless/intellij-idea.importorder</file>
</importOrder>
</java>
</configuration>
Expand Down

0 comments on commit 3bb2c57

Please sign in to comment.