diff --git a/ChangeLog b/ChangeLog index 27849b4e27..7a07a17f35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Feb 20 05:33:17 2011 Ryan Davis + + * lib/minitest/*.rb: Imported minitest 2.0.2 r6207. + * test/minitest/*: ditto + Sun Feb 20 02:14:09 2011 KOSAKI Motohiro * signal.c (sig_trap): avoid pthread_sigmask(xx, &mask, &mask) usage diff --git a/lib/minitest/autorun.rb b/lib/minitest/autorun.rb index 5bf35f6ab8..3b6c2d49f1 100644 --- a/lib/minitest/autorun.rb +++ b/lib/minitest/autorun.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'minitest/unit' require 'minitest/spec' diff --git a/lib/minitest/benchmark.rb b/lib/minitest/benchmark.rb index f8dcee745e..83f62917ca 100644 --- a/lib/minitest/benchmark.rb +++ b/lib/minitest/benchmark.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'minitest/unit' require 'minitest/spec' diff --git a/lib/minitest/mock.rb b/lib/minitest/mock.rb index adff7455a7..1cbf18b19f 100644 --- a/lib/minitest/mock.rb +++ b/lib/minitest/mock.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### class MockExpectationError < StandardError; end diff --git a/lib/minitest/pride.rb b/lib/minitest/pride.rb index 3cb4e1564c..9a4d68859a 100644 --- a/lib/minitest/pride.rb +++ b/lib/minitest/pride.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require "minitest/unit" diff --git a/lib/minitest/spec.rb b/lib/minitest/spec.rb index 8e2412e5ea..79f2102bca 100644 --- a/lib/minitest/spec.rb +++ b/lib/minitest/spec.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### #!/usr/bin/ruby -w diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb index 100d77f61a..e3a069a3e9 100644 --- a/lib/minitest/unit.rb +++ b/lib/minitest/unit.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'optparse' @@ -100,7 +100,8 @@ module MiniTest # Fails unless the block returns a true value. def assert_block msg = nil - assert yield, "Expected block to return true value." + msg = message(msg) { "Expected block to return true value" } + assert yield, msg end ## diff --git a/test/minitest/test_minitest_benchmark.rb b/test/minitest/test_minitest_benchmark.rb index 089d0b3ce0..47f55232e6 100644 --- a/test/minitest/test_minitest_benchmark.rb +++ b/test/minitest/test_minitest_benchmark.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'minitest/autorun' require 'minitest/benchmark' diff --git a/test/minitest/test_minitest_mock.rb b/test/minitest/test_minitest_mock.rb index bb4279c7d1..311f5fa7fb 100644 --- a/test/minitest/test_minitest_mock.rb +++ b/test/minitest/test_minitest_mock.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'minitest/mock' require 'minitest/unit' diff --git a/test/minitest/test_minitest_spec.rb b/test/minitest/test_minitest_spec.rb index 733ce0f5c7..b0a6474a71 100644 --- a/test/minitest/test_minitest_spec.rb +++ b/test/minitest/test_minitest_spec.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'minitest/spec' diff --git a/test/minitest/test_minitest_unit.rb b/test/minitest/test_minitest_unit.rb index a8187f2275..eaf1aa475e 100644 --- a/test/minitest/test_minitest_unit.rb +++ b/test/minitest/test_minitest_unit.rb @@ -1,8 +1,8 @@ -############################################################ -# This file is imported from a different project. -# DO NOT make modifications in this repo. -# File a patch instead and assign it to Ryan Davis -############################################################ +###################################################################### +# This file is imported from the minitest project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis. +###################################################################### require 'stringio' require 'pathname' @@ -409,8 +409,8 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase end def test_assert_block_triggered - util_assert_triggered 'Expected block to return true value.' do - @tc.assert_block do + util_assert_triggered "blah.\nExpected block to return true value." do + @tc.assert_block "blah" do false end end