Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minitest-extended_assertions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minitest-extended_assertions

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Minitest::ExtendedAssertions

Gem Version Build Status Coverage Status Code Climate

Extended assertions for Minitest

Installation

Add this line to your application's Gemfile:

gem 'minitest-extended_assertions'

And then execute:

$ bundle

Or install it yourself as:

$ gem install minitest-extended_assertions

Usage

Hash

expected = {a: 1, b: 2}
actual = {a: 2, b: 1}

assert_equal_hash expected, actual
actual.must_equal_hash expected

# [:a]
# Expected: 1
#   Actual: 2

# [:b]
# Expected: 2
#   Actual: 1

Array

expected = [1, 2, 3, 4]
actual = [1, 20, 3, 40]

assert_equal_array expected, actual
actual.must_equal_array expected

# [1]
# Expected: 2
#   Actual: 20

# [3]
# Expected: 4
#   Actual: 40

JSON

expected = '{"a": 1, "b": 2}'
actual = '{"a": 2, "b": 1}'

assert_equal_json expected, actual
actual.must_equal_json expected

# ["a"]
# Expected: 1
#   Actual: 2

# ["b"]
# Expected: 2
#   Actual: 1

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/gabynaiman/minitest-extended_assertions.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 24 Jan 2022

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc