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

minitest_change_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_change_assertions

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Minitest Change Assertions

Gem Version Build Status RubyGems Downloads Buy Me a Coffee

Provides assertions for your Minitest suite to determine if an object has been changed.

Install

gem 'minitest_change_assertions'

Usage

assert_changed

assert_changed 'user.name' do
  user.name = 'Bob'
end

assert_changed -> { user.name } do
  user.name = 'Bob'
end

### OR with optional :to argument

assert_changed 'user.name', to: 'Bob' do
  user.name = 'Bob'
end

assert_changed -> { user.name }, to: 'Bob' do
  user.name = 'Bob'
end

assert_not_changed

assert_not_changed 'user.name' do
  user.update(attrs)
end

assert_not_changed -> { user.name } do
  user.update(attrs)
end

### OR with optional :to argument

assert_not_changed 'user.name', to: 'Allen' do
  user.name = 'Bob'
end

assert_not_changed -> { user.name }, to: 'Allen' do
  user.name = 'Bob'
end

Credits

Created by Weston Ganger - @westonganger

For any consulting or contract work please contact me via my company website: Solid Foundation Web Development

FAQs

Package last updated on 11 Jul 2018

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