mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Simplify matching logic in tests
Simplify matching logic by adding a custom matcher which handles the task of normalisation of object IDs instead of calling gsub many times throughout the test code. This allows our tests to focus more on what needs to be tested instead obfuscating the tests with logic unrelated to what the test is trying to cover. It also allows making the normalisation code more robust so there is less chance of an accidental match or typo slipping in. The change also replaces the arbitary default object IDs with a string that makes it very obvious that it is just a placeholder.
This commit is contained in:
parent
28901dcca2
commit
c5e8669e9c
6 changed files with 223 additions and 211 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue