waterlink / rspec-json_expectations

Set of matchers and helpers to allow you test your APIs responses like a pro.
https://www.relishapp.com/waterlink/rspec-json-expectations/docs
MIT License
140 stars 23 forks source link

Define traverse methods in proper context #36

Open mcountis opened 3 years ago

mcountis commented 3 years ago

In the same spirit as how RSpec::Matchers::define evaluates given blocks in the context of a class/module, evaluate blocks given to RSpec::JsonExpectations::MatcherFactory#define_matcher in the same manner. Any methods defined in the given block will be defined as instance methods on the new Matcher rather than in a main/global context.

Partially addresses #28 (warnings about #traverse getting redefined).

mcountis commented 3 years ago

@waterlink / @alex-fedorov, do you still manage this repo? If not, have you any thoughts about passing it on to another user?