Skip to content

Commit d6f72c7

Browse files
remove whitespace example
1 parent 4305ea2 commit d6f72c7

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "needs_env_var"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
edition = "2021"
55
description = "Skip a test if an environment variable is undefined or has a specific value."
66
license = "MIT"

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@ Early return from a test (or method in general) if an environment variable is un
77

88
# Example
99

10-
`some_test` will be skipped if `SOMEENVIRONMENTVARIABLE` is not defined or does not match `1` (examples 2 & 3).
10+
`some_test` will be skipped if `MY_ENVIRONMENT_VARIABLE` is not defined (example 1) or does not match `1` (examples 2).
1111

1212
```rust
1313
use needs_env_var::*;
1414

15-
#[needs_env_var(SOMEENVIRONMENTVARIABLE)]
15+
#[needs_env_var(MY_ENVIRONMENT_VARIABLE)]
1616
#[test]
1717
fn some_test() {
1818
assert!(1 == 1);
1919
}
2020

2121
// or if its specified value not matched
22-
#[needs_env_var(SOMEENVIRONMENTVARIABLE = 1)]
23-
#[test]
24-
fn some_test() {
25-
assert!(1 == 1);
26-
}
27-
28-
29-
#[needs_env_var(SOMEENVIRONMENTVARIABLE=1)]
22+
#[needs_env_var(MY_ENVIRONMENT_VARIABLE=1)]
3023
#[test]
3124
fn some_test() {
3225
assert!(1 == 1);

0 commit comments

Comments
 (0)