RSpec equality matcher that deeply compares array without order - arrays of primitives, hashes, and arrays
Add this line to your application's Gemfile:
gem 'eq_wo_order'
And then execute:
$ bundle
Or install it yourself as:
$ gem install eq_wo_order
first = [[1, 2, 3]]
second = [[3, 1, 2]]
expect(first).to eq_wo_order second
- Fork it ( https://github.com/[my-github-username]/eq_wo_order/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request