Sha256: b66a6c82641cbd83d381ab588508c69f7943f9d88590b65fb031974501f11b13

Contents?: true

Size: 874 Bytes

Versions: 1

Compression:

Stored size: 874 Bytes

Contents

= 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.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
assert_repeated-1.0.0 README.rdoc