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

assert_repeated

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert_repeated

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

= assert_repeated

Assertions that run multiple times, used to smoke-test or randomly probe a function with a large domain.

assert_repeatedly_true(1000) do
  expected = rand(100)
  actual = decrypt(encrypt(expected))
  expected == actual
end

assert_repeatedly_false(10) do
  !she_loves_me
end

assert_repeatedly(100_000, /awesome/) do
  "writing tests is awesome!"
end

This is way better than running assert in a loop because it doesn't blow up the assertion counter:

45 tests, 1089 assertions, 0 failures, 0 errors

== Note on Patches/Pull Requests

  • Fork the project.
  • Add tests for your feature addition or bug fix.
  • Commit.
  • Make the tests pass.
  • Commit.
  • Send me a pull request.

== Copyright

Copyright (c) 2009 Bryce Kerley and Todd Willey.

DO WHATEVER YOU WANT WITH THIS SOFTWARE; see LICENSE for details.

FAQs

Package last updated on 22 Nov 2009

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