Skip to content

Commit 5258008

Browse files
committed
Prepare 0.22.0 release
1 parent 81acba8 commit 5258008

File tree

10 files changed

+300
-291
lines changed

10 files changed

+300
-291
lines changed

CHANGELOG.md

Lines changed: 189 additions & 186 deletions
Large diffs are not rendered by default.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cucumber"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
edition = "2024"
55
rust-version = "1.88"
66
description = """\
@@ -82,7 +82,7 @@ smart-default = "0.7.1"
8282

8383
# "macros" feature dependencies.
8484
anyhow = { version = "1.0.58", optional = true }
85-
cucumber-codegen = { version = "=0.21.1", path = "./codegen", optional = true }
85+
cucumber-codegen = { version = "=0.22.0", path = "./codegen", optional = true }
8686
cucumber-expressions = { version = "0.5", features = ["into-regex"], optional = true }
8787
inventory = { version = "0.3", optional = true }
8888

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Cucumber testing framework for Rust
1010
An implementation of the [Cucumber] testing framework for Rust. Fully native, no external test runners or dependencies.
1111

1212
- Book ([current][1] | [edge][2])
13-
- [Changelog](https://github.com/cucumber-rs/cucumber/blob/main/CHANGELOG.md)
13+
- [Changelog](https://github.com/cucumber-rs/cucumber/blob/v0.22.0/CHANGELOG.md)
1414

1515

1616

@@ -113,8 +113,8 @@ The full gamut of Cucumber's [Gherkin] language is implemented by the [`gherkin`
113113

114114
This project is licensed under either of
115115

116-
* Apache License, Version 2.0 ([LICENSE-APACHE](https://github.com/cucumber-rs/cucumber/blob/main/LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
117-
* MIT license ([LICENSE-MIT](https://github.com/cucumber-rs/cucumber/blob/main/LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
116+
* Apache License, Version 2.0 ([LICENSE-APACHE](https://github.com/cucumber-rs/cucumber/blob/v0.22.0/LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
117+
* MIT license ([LICENSE-MIT](https://github.com/cucumber-rs/cucumber/blob/v0.22.0/LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
118118

119119
at your option.
120120

book/src/output/intellij.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ IntelliJ Rust (`libtest`) integration
55

66
Example below is set up to output with the default [`writer::Basic`] if there is no `--format=json` option, or with [`writer::Libtest`] otherwise.
77
```toml
8-
cucumber = { version = "0.20", features = ["libtest"] }
8+
cucumber = { version = "0.22", features = ["libtest"] }
99
```
1010
```rust
1111
# extern crate cucumber;

book/src/output/json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Cucumber JSON format
55

66
This requires `output-json` feature to be enabled in `Cargo.toml`:
77
```toml
8-
cucumber = { version = "0.20", features = ["output-json"] }
8+
cucumber = { version = "0.22", features = ["output-json"] }
99
```
1010

1111
And configuring output to [`writer::Json`]:

book/src/output/junit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ JUnit XML report
55

66
This requires `output-junit` feature to be enabled in `Cargo.toml`:
77
```toml
8-
cucumber = { version = "0.20", features = ["output-junit"] }
8+
cucumber = { version = "0.22", features = ["output-junit"] }
99
```
1010

1111
And configuring output to [`writer::JUnit`]:

book/src/quickstart.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To start, let's create a directory called `tests/` in the root of the project an
88
Add this to `Cargo.toml`:
99
```toml
1010
[dev-dependencies]
11-
cucumber = "0.20"
11+
cucumber = "0.22"
1212
futures = "0.3"
1313

1414
[[test]]
@@ -37,7 +37,7 @@ To enable testing of our `simple.feature`, let's add this code to `example.rs`:
3737
#
3838
use cucumber::{World, given};
3939

40-
// These `Cat` definitions would normally be inside your project's code,
40+
// These `Cat` definitions would normally be inside your project's code,
4141
// not test code, but we create them here for the show case.
4242
#[derive(Debug, Default)]
4343
struct Cat {
@@ -51,7 +51,7 @@ impl Cat {
5151
}
5252

5353
// `World` is your shared, likely mutable state.
54-
// Cucumber constructs it via `Default::default()` for each scenario.
54+
// Cucumber constructs it via `Default::default()` for each scenario.
5555
#[derive(Debug, Default, World)]
5656
pub struct AnimalWorld {
5757
cat: Cat,
@@ -88,7 +88,7 @@ fn main() {
8888
> #
8989
> #[derive(Debug, World)]
9090
> // Accepts both sync/async and fallible/infallible functions.
91-
> #[world(init = Self::new)]
91+
> #[world(init = Self::new)]
9292
> pub struct AnimalWorld {
9393
> cat: Cat,
9494
> }
@@ -103,7 +103,7 @@ fn main() {
103103
> # fn main() {}
104104
> ```
105105
106-
If we run this, we should see an output like this:
106+
If we run this, we should see an output like this:
107107
![record](rec/quickstart_simple_1.gif)
108108
109109
A checkmark `✔` next to the `Given a hungry cat` [step] means that it has been matched, executed and passed.
@@ -161,7 +161,7 @@ fn feed_cat(world: &mut AnimalWorld) {
161161
# }
162162
```
163163
164-
Once we run the tests again, we see that two lines are green now and the next one is marked as not yet implemented:
164+
Once we run the tests again, we see that two lines are green now and the next one is marked as not yet implemented:
165165
![record](rec/quickstart_simple_2.gif)
166166

167167
Finally, how do we check our result? We expect that this will cause some change in the cat and that the cat will no longer be hungry since it has been fed. The `then` [step] matcher follows to assert this, as our [feature] says:
@@ -211,7 +211,7 @@ fn cat_is_fed(world: &mut AnimalWorld) {
211211
# }
212212
```
213213

214-
Once we run the tests, now we see all steps being accounted for and the whole [scenario] passing:
214+
Once we run the tests, now we see all steps being accounted for and the whole [scenario] passing:
215215
![record](rec/quickstart_simple_3.gif)
216216

217217
> __TIP__: In addition to assertions, we may also return a `Result<()>` from a [step] matching function. Returning `Err` will cause the [step] to fail. This lets using the `?` operator for more concise step implementations just like in [unit tests](https://doc.rust-lang.org/rust-by-example/testing/unit_testing.html#tests-and-).
@@ -261,7 +261,7 @@ fn cat_is_fed(world: &mut AnimalWorld) {
261261
# }
262262
```
263263

264-
And see the test failing:
264+
And see the test failing:
265265
![record](rec/quickstart_simple_fail.gif)
266266

267267
> __TIP__: By default, unlike [unit tests](https://doc.rust-lang.org/cargo/commands/cargo-test.html#test-options), failed [step]s don't terminate the execution instantly, and the whole test suite is executed regardless of them. Use `--fail-fast` [CLI] option to stop execution on first failure.
@@ -332,7 +332,7 @@ fn hungry_cat(world: &mut AnimalWorld, state: String) {
332332

333333
> __NOTE__: We surround the regex with `^..$` to ensure an __exact__ match. This is much more useful when adding more and more [step]s, so they won't accidentally interfere with each other.
334334
335-
[Cucumber] will reuse these [step] matchers:
335+
[Cucumber] will reuse these [step] matchers:
336336
![record](rec/quickstart_concurrent_sync.gif)
337337

338338
> __NOTE__: Captured values are __bold__ to indicate which part of a [step] is actually captured.
@@ -398,7 +398,7 @@ A contrived example, but it demonstrates that [step]s can be reused as long as t
398398
Let's switch our runtime to `tokio`:
399399
```toml
400400
[dev-dependencies]
401-
cucumber = "0.20"
401+
cucumber = "0.22"
402402
tokio = { version = "1.10", features = ["macros", "rt-multi-thread", "time"] }
403403

404404
[[test]]

0 commit comments

Comments
 (0)