Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Provide and ProvideRef traits to provide AppContext objects #510

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

spencewenski
Copy link
Member

Also, annotate with mockall::automock when the new testing-mocks feature is enabled to allow consumers to easily provide mocks to methods expecting a trait impl.

This is significantly simpler than mocking the AppContext struct itself, so we will not do that for now. We can consider doing it later if people really want it.

Closes #495

Also, annotate with `mockall::automock` when the new `testing-mocks`
feature is enabled to allow consumers to easily provide mocks to methods
expecting a trait impl.
Copy link

codecov bot commented Nov 16, 2024

Codecov Report

Attention: Patch coverage is 5.26316% with 54 lines in your changes missing coverage. Please review.

Project coverage is 40.55%. Comparing base (928ca3b) to head (28bab2a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/app/context.rs 5.26% 54 Missing ⚠️
Files with missing lines Coverage Δ
src/app/context.rs 11.67% <5.26%> (-1.96%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 928ca3b...28bab2a. Read the comment docs.

@spencewenski spencewenski merged commit 2246d56 into main Nov 16, 2024
18 of 19 checks passed
@spencewenski spencewenski deleted the gh-495-mock-context-traits branch November 16, 2024 08:20
@github-actions github-actions bot mentioned this pull request Nov 16, 2024
spencewenski added a commit that referenced this pull request Nov 16, 2024
## 🤖 New release
* `roadster`: 0.6.18 -> 0.6.19 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.6.19](roadster-v0.6.18...roadster-v0.6.19)
- 2024-11-16

### Added

- `Provide` and `ProvideRef` traits to provide `AppContext` objects
([#510](#510))

### Other

- Use justfile command to run coverage
([#509](#509))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Spencer Ferris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow mocking the DB connection
1 participant