* test/minitest/test_mini_test.rb: the number of assertions must be

exactly equal to the number of assertion method calls that the end-user
  would write. [ruby-dev:37703]

* test/minitest/test_mini_spec.rb: ditto.

* lib/minitest/unit.rb: ditto. 
  Patch by David Flanagan <david AT davidflanagan.com>. [ruby-core:21350]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-01-16 04:57:54 +00:00
parent 739ad75f45
commit 5924d8565c
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,8 @@ Fri Jan 16 13:28:09 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
exactly equal to the number of assertion method calls that the end-user exactly equal to the number of assertion method calls that the end-user
would write. [ruby-dev:37703] would write. [ruby-dev:37703]
* test/minitest/test_mini_spec.rb: ditto.
* lib/minitest/unit.rb: ditto. * lib/minitest/unit.rb: ditto.
Patch by David Flanagan <david AT davidflanagan.com>. [ruby-core:21350] Patch by David Flanagan <david AT davidflanagan.com>. [ruby-core:21350]

View file

@ -73,7 +73,7 @@ describe MiniTest::Spec do
end end
it "needs to verify regexp matches" do it "needs to verify regexp matches" do
@assertion_count = 6 @assertion_count = 4
"blah".must_match(/\w+/).must_equal true "blah".must_match(/\w+/).must_equal true
proc { "blah".must_match(/\d+/) }.must_raise MiniTest::Assertion proc { "blah".must_match(/\d+/) }.must_raise MiniTest::Assertion
@ -140,7 +140,7 @@ describe MiniTest::Spec do
end end
it "needs to verify mismatch" do it "needs to verify mismatch" do
@assertion_count = 6 @assertion_count = 4
"blah".wont_match(/\d+/).must_equal false "blah".wont_match(/\d+/).must_equal false
proc { "blah".wont_match(/\w+/) }.must_raise MiniTest::Assertion proc { "blah".wont_match(/\w+/) }.must_raise MiniTest::Assertion
end end