Sha256: 820d73f6914aa5a1b93ab8f6a20b55daa97740970192d673ca9aca562833c0c4
Contents?: true
Size: 867 Bytes
Versions: 3
Compression:
Stored size: 867 Bytes
Contents
# RSpec Deep Matcher [![Gem Version](https://badge.fury.io/rb/rspec-deep-ignore-order-matcher.png)](http://badge.fury.io/rb/rspec-deep-ignore-order-matcher) This gem adds a custom matcher to RSpec to recursively compare nested Ruby data-structures consisting of Hash and Array elements. An order of elements in an array is ignored. ## Install ``` gem install rspec-deep-ignore-order-matcher ``` or add to your `Gemfile` ``` gem 'rspec-deep-ignore-order-matcher' ``` and run ``` bundle install ``` ## Example ``` require 'rspec-deep-ignore-order-matcher' describe 'Products' do it "should ignore order of product's tags" do expected = [{ :product => { :title => 'Product 1', :tags => ['large', 'blue', 'heavy'] } }] actual = [{ :product => { :title => 'Product 1', :tags => ['blue', 'large', 'heavy'] } }] actual.should be_deep_equal expected end end ```
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
rspec-deep-ignore-order-matcher-0.0.4 | README.md |
rspec-rails-deep-ignore-order-matcher-0.0.4 | README.md |
rspec-deep-ignore-order-matcher-0.0.3 | README.md |