mirror of
https://github.com/joshuaclayton/unused.git
synced 2024-10-26 13:19:58 +03:00
6ffb098b20
Why? ==== Dynamic languages, and Rails in particular, support some fun method creation. One common pattern is, within RSpec, to create matchers dynamically based on predicate methods. Two common examples are: * `#admin?` gets converted to the matcher `#be_admin` * `#has_active_todos?` gets converted to the matcher `#have_active_todos` This especially comes into play when writing page objects with predicate methods. This change introduces the concept of aliases, a way to describe the before/after for these transformations. This introduces a direct swap with a wildcard value (%s), although this may change in the future to support other transformations for pluralization, camel-casing, etc. Externally, aliases are not grouped together by term; however, the underlying counts are summed together, increasing the total occurrences and likely pushing the individual method out of "high" likelihood into "medium" or "low" likelihood. Closes #19. |
||
---|---|---|
.. | ||
Unused | ||
Spec.hs |