Skip to content

Commit

Permalink
Move the run helper notes to bottom of section
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns authored Feb 7, 2019
1 parent 65ead9e commit e6f9209
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,6 @@ command, saves the exit status and output into special global variables, and
then returns with a `0` status code so you can continue to make assertions in
your test case.

__Note:__ The `run` helper executes its argument(s) in a subshell, so if
writing tests against environmental side-effects like a variable's value
being changed, these changes will not persist after `run` completes.

For example, let's say you're testing that the `foo` command, when passed a
nonexistent filename, exits with a `1` status code and prints an error message.

Expand Down Expand Up @@ -280,6 +276,10 @@ without any arguments prints usage information on the first line:
}
```

__Note:__ The `run` helper executes its argument(s) in a subshell, so if
writing tests against environmental side-effects like a variable's value
being changed, these changes will not persist after `run` completes.

### `load`: Share common code

You may want to share common code across multiple test files. Bats includes a
Expand Down

0 comments on commit e6f9209

Please sign in to comment.