Petitest::PowerAssert

Gem Version Documentation

Power Assert for Petitest.

Installation

Add this line to your application's Gemfile:

gem "petitest-power_assert"

And then execute:

bundle

Or install it yourself as:

gem install petitest-power_assert

Usage

  1. Require petitest/power_assert
  2. Prepend Petitest::PowerAssert into your test group
  3. Write tests as usual
require "petitest/autorun"
require "petitest/power_assert"

class ExampleTest < Petitest::TestGroup
  prepend ::Petitest::PowerAssert

  def test_block
    a = 1
    b = 1
    assert do
      a + b == 100
    end
  end

  def test_equality
    assert_equal("foo" + "bar", :baz.to_s)
  end

  # ... more tests ...
end

image