1
0
Fork 0
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:
Gerard Caulfield 2016-05-10 00:04:42 +10:00
parent 28901dcca2
commit c5e8669e9c
No known key found for this signature in database
GPG key ID: 623B327128A9BEC3
6 changed files with 223 additions and 211 deletions

File diff suppressed because it is too large Load diff