mbklein / equivalent-xml

Easy equivalency tests for Nokogiri and Oga XML
MIT License
94 stars 29 forks source link

Ability to set global default options #39

Open philnash opened 6 years ago

philnash commented 6 years ago

First up, thanks for this gem! It is exactly what I need for testing some XML output and is vastly simplifying a lot of code I wrote. Thank you!

One thing I would like to change is the ability to set the default options. In my tests I always want to respect element order, yet I have to call (using the rspec matchers) .respecting_element_order every time. I'd prefer to be able to set that once for my test suite and not have to repeat myself.

I'd love to help add this, if you're interested. Let me know.

mbklein commented 6 years ago

I'd be happy to merge a pull request that provides a good mechanism for the kind of default behavior you're talking about. Feel free to fork, and hit me up for questions/check-ins if you need. :)