0.0
No commit activity in last 3 years
No release in over 3 years
Assertions that run multiple times for testing functions with large domains
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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 © 2009 Bryce Kerley and Todd Willey.

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