Skip to content

Commit

Permalink
Document loading one-off cases in RSpec (#98)
Browse files Browse the repository at this point in the history
Ref #95

Needs a `type: :feature` too to match the integration example above.
  • Loading branch information
kaspth authored Jan 8, 2025
1 parent deb212a commit fafa951
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ class PaginationTest < ActionDispatch::IntegrationTest
end
```
And in RSpec:

```ruby
RSpec.describe "Pagination", type: :feature do
before { seed "cases/pagination" }
end
```

> [!NOTE]
> We're recommending having one-off seeds on an individual unit of work to help reinforce test isolation. Having some seed files be isolated also helps:
>
Expand Down

0 comments on commit fafa951

Please sign in to comment.