Commit 9da4d58
committed
Migrate tests from Packwerk::ReferenceOffense mocks to PksOffense
Replace all sorbet_double(Packwerk::ReferenceOffense, ...) mocks with
real PksOffense objects in the test suite. This aligns the tests with
the actual behavior of the PksWrapper, which returns PksOffense objects.
Key changes:
- Add build_pks_offense helper to spec_helper.rb
- Replace Packwerk mocks in 'using inputted formatter' tests
- Replace Packwerk mocks in 'using default formatter' tests
- Update expectations where constant.location now points to the
violation file instead of the constant definition file
This is a known behavioral change: pks output doesn't include the
constant definition location, so URLs and file paths in formatted
messages now reference the violation file.1 parent d32b0dd commit 9da4d58
2 files changed
Lines changed: 277 additions & 280 deletions
0 commit comments