Skip to content

Commit

Permalink
Fix indentation so that Transactions.md ordered list is numbered corr…
Browse files Browse the repository at this point in the history
…ectly.
  • Loading branch information
threeplanetssoftware committed Feb 2, 2024
1 parent 283d8c6 commit 02fe0f7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions features/Transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,30 @@ guidelines:

1. Be sure to clean up any data in an `after(:context)` hook:

```ruby
before(:context) do
@widget = Widget.create!
end
```ruby
before(:context) do
@widget = Widget.create!
end

after(:context) do
@widget.destroy
end
```
after(:context) do
@widget.destroy
end
```

If you don't do that, you'll leave data lying around that will eventually
If you don't do that, you'll leave data lying around that will eventually
interfere with other examples.

2. Reload the object in a `before(:example)` hook.

```ruby
before(:context) do
@widget = Widget.create!
end
```ruby
before(:context) do
@widget = Widget.create!
end
before(:example) do
@widget.reload
end
```
before(:example) do
@widget.reload
end
```

Even though database updates in each example will be rolled back, the
object won't _know_ about those rollbacks so the object and its backing
Expand Down

0 comments on commit 02fe0f7

Please sign in to comment.