[ANN] test-unit 2.0.7

Discussion in 'Ruby' started by Kouhei Sutou, Mar 9, 2010.

  1. Kouhei Sutou

    Kouhei Sutou Guest

    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,
    --
    kou
     
    Kouhei Sutou, Mar 9, 2010
    #1
    1. Advertising

  2. Kouhei Sutou wrote:
    > 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


    Awesome, thanks. I'm glad to see my request regarding duplicate test
    names was addressed! I had actually forgotten about it. :)

    Regards,

    Dan
     
    Daniel Berger, Mar 9, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edvard Majakari
    Replies:
    4
    Views:
    707
    Edvard Majakari
    Feb 25, 2005
  2. VvanN
    Replies:
    5
    Views:
    517
    Phlip
    Apr 28, 2006
  3. Bill David
    Replies:
    2
    Views:
    284
    Arne Vajhøj
    Jun 18, 2008
  4. Bill Mosteller
    Replies:
    0
    Views:
    251
    Bill Mosteller
    Oct 22, 2009
  5. timr
    Replies:
    2
    Views:
    182
Loading...

Share This Page