Commit Graph

1 Commits

Author SHA1 Message Date
Esteban Pastorino 60847d6d5d Update rspec matcher to work with custom version association names
`have_a_version_with` and `have_a_version_with_changes` had the
`versions` association call hardcoded.
If `has_paper_trail` had the `versions` option set to something else
(e.g: `has_paper_trail versions: :paper_trail_versions`) the matcher
couldn't be used.

This fixes that issue by dynamically fetching the association name from
the `:versions_association_name` class attribute.
2017-02-07 10:26:17 +01:00