No release in over 3 years
Low commit activity in last 3 years
A place to stash Test::Unit assertions I've found handy. Use at your own risk
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.10, ~> 1
>= 9.0, ~> 9
>= 2.1, ~> 2
>= 5.9, ~> 5
~> 2
>= 4.2.2, ~> 4
>= 3.5, ~> 3
>= 0.11, ~> 0
 Project Readme

fun_with_testing¶ ↑

A bunch of useful assertions, and a subclass of Test::Unit::TestCase for my gems to derive from.

Usage:

# This might go in test/helper.rb, for example
class GemTestCase < FunWith::Testing::TestCase
  install_basic_assertions
end

Then in test/test_gem.rb:

class MyUnitTest < GemTestCase
  def test_my_thing
    assert_zero( 0 )
    assert_not_zero( 1 )
    assert_has_method( 1, :to_s )
    # ... and so on down the line
  end
end

In the FunWith gems, gem tests use a subclass of FunWith::Testing::TestCase, a subclass of Test::Unit::TestCase with some helpful methods.

#_should() : ignores the inner block, instead prints a message warning that the test is being skipped
#_context() : ignores the inner block, instead prints a message warning that the set of tests is being skipped.

Contributing to fun_with_testing¶ ↑

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2014 Bryce Anderson. See LICENSE.txt for further details.