Sha256: ccc3623523438b55fc5bd4629772f521e751da8cd932a7bd2b8b9f4c83b97dda
Contents?: true
Size: 664 Bytes
Versions: 1
Compression:
Stored size: 664 Bytes
Contents
# RSpec Deep 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 ``` sudo gem install rspec-deep-ignore-order-matcher ``` or add to your `Gemfile` ``` gem 'rspec-deep-ignore-order-matcher' ``` ## Example ``` 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-deep-ignore-order-matcher-0.0.1 | README.md |