Sha256: 48c132f5b1465a58c9e98f986e767af36c04dc8fa394e133775b291101b34c71
Contents?: true
Size: 721 Bytes
Versions: 4
Compression:
Stored size: 721 Bytes
Contents
require 'minitest/autorun' require 'minitest/around/unit' class TestWithoutAround < MiniTest::Unit::TestCase def test_no_around_defined assert true end end class TestWithoutArgs < MiniTest::Unit::TestCase def around $before = true yield $before = false # hard to test? end def test_runs_around assert_equal true, $before end end class TestWithSingleArg < MiniTest::Unit::TestCase def around yield "string" end def test_around_passes_string(string) assert_equal "string", string end end class TestWithMultipleArgs < MiniTest::Unit::TestCase def around yield 1, 2 end def test_passes_multiple_args(a, b) assert_equal 1, a assert_equal 2, b end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
minitest-around-0.0.6.pre | test/around_test.rb |
minitest-around-0.0.5 | test/around_test.rb |
minitest-around-0.0.4 | test/around_test.rb |
minitest-around-0.0.4.pre | test/around_test.rb |