Forum: Ruby test-unit 2.0.7

Posted by Kouhei Sutou (Guest)
on 2010-03-09 13:10
(Received via mailing list)
Hi,

test-unit 2.0.7 has been released:
  http://test-unit.rubyforge.org/

Install:
  % sudo gem install test-unit

Highlights:
This release includes redefined test method detection:

test-calc.rb:
  require 'rubygems'
  gem 'test-unit'
  require 'test/unit'

  class CalcTest < Test::Unit::TestCase
    def test_add
       assert_equal(10000000, 1 + 2)
    end

    def test_add
       assert_equal(3, 1 + 2)
    end
  end
--

  % ruby test-calc.rb
  Loaded suite test-calc
  Started
  N.

    1) Notification: CalcTest#test_add was redefined
  test_add(CalcTest)
  test-calc.rb:10

  Finished in 0.001629 seconds.

  1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 
1 notifications
  100% passed

NOTE:
This release include interface incompatible. Multiple --name
and --testcase command line options narrow down targets
instead of adding targets.

Before:
  '--testcase CalcTest --name test_sub' means 'runs CalcTest
  test case and test_sub test'.

Now:
  '--testcase CalcTest --name test_sub' means 'runs test_sub
  test in CalcTest test case'.

Description:
Test::Unit 2.x - Improved version of Test::Unit bundled in
Ruby 1.8.x.

Ruby 1.9.x bundles miniunit not Test::Unit. Test::Unit
bundled in Ruby 1.8.x had not been improved but unbundled
Test::Unit (Test::Unit 2.x) will be improved actively.

Changes:
* 4 major enhancements
  * detect redefined test methods.
  * [INTERFACE IMCOMPATIBLE] multiple --name and --testcase
    options narrow down targets instead of adding targets.
  * [#27764] accept custom test_order for each test case.
    [Suggested by David MARCHALAND]
  * [#27790] ignore omitted tests from 'n% passed' report.
    [Suggested by Daniel Berger]

* 2 minor enchancements
  * [#27832] ignore .git directory. [Suggested by Daniel Berger]
  * [#27792] require 'fileutils' and 'tmpdir' lazily for non-priority
    mode users. [Suggested by David MARCHALAND]

* 2n bug fixes
  * [#27892] modify processed arguments array destructively.
    [Reported by Bob Saveland]
  * work without HOME environment variable.
    [Reported by Champak Ch]

* Thanks
  * David MARCHALAND
  * Daniel Berger
  * Bob Saveland
  * Champak Ch

Thanks,
Posted by Daniel Berger (djberg96)
on 2010-03-09 14:15
(Received via mailing list)
Kouhei Sutou wrote:
> 
>     def test_add
>     1) Notification: CalcTest#test_add was redefined
> and --testcase command line options narrow down targets
> Description:
>   * [INTERFACE IMCOMPATIBLE] multiple --name and --testcase
> 
>   * Champak Ch
Awesome, thanks. I'm glad to see my request regarding duplicate test
names was addressed! I had actually forgotten about it. :)

Regards,

Dan
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.