Behaves is a gem that helps you maintain contracts between different classes. This is especially useful for dealing for adapter patterns by making sure that all of your adapters define the required behaviors.
For example, you can specify that class Dog and class Cat should both behave the same as Animal, or that your ApiClientMock should behave the same as the original ApiClient (more explanation below)
The idea for Behaves stemmed from my research into adapter pattern in Ruby and José Valim's article on Mocks and explicit contracts.
Behaves alternatives and related gems
Based on the "Core Extensions" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Behaves or a related project?
Behaves RecommendationsThere are no recommendations yet. Be the first to promote Behaves!
Have you used Behaves? Share your experience. Write a short recommendation and Behaves, you and your project will be promoted on Awesome Ruby.
Recently added Behaves resources
Be the first to add one!