Socket
Book a DemoInstallSign in
Socket

rspec-deep-ignore-order-matcher

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rspec-deep-ignore-order-matcher

0.0.6
bundlerRubygems
Version published
Maintainers
1
Created
Source

RSpec Deep Matcher

Gem Version Code Climate Build Status

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'] } }]
		expect(actual).to be_deep_equal expected
	end
end

FAQs

Package last updated on 09 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.