Project

General

Profile

Actions

Feature #1193

closed

Justified Error Messages

Added by bahuvrihi (Simon Chiang) about 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
[ruby-core:22333]

Description

=begin
One nice thing about Test::Unit output is that failures are justified making string comparisons easier.

In Test::Unit

<"minitest/unit is a small and fast replacement for ruby's huge and slow test/unit."> expected but was
<"minitest/unit is a small and fast replaecment for ruby's huge and slow test/unit.">.

In MiniTest::Unit

Expected "minitest/unit is a small and fast replacement for ruby's huge and slow test/unit.", not
"minitest/unit is a small and fast replaecment for ruby's huge and slow test/unit.".

The error (replaecment) is harder to find when the output is not justified.

FYI I submitted this as a feature request to Ryan Davis on the Rubyforge site and he rejected the request. I am resubmitting it here because I feel it is quite important and trivial to implement.
=end

Actions #1

Updated by matz (Yukihiro Matsumoto) about 15 years ago

=begin
Hi,

In message "Re: [ruby-core:22333] [Feature #1193] Justified Error Messages"
on Mon, 23 Feb 2009 01:44:46 +0900, Simon Chiang writes:

|One nice thing about Test::Unit output is that failures are justified making string comparisons easier.
|
|In Test::Unit
|
|<"minitest/unit is a small and fast replacement for ruby's huge and slow test/unit."> expected but was
|<"minitest/unit is a small and fast replaecment for ruby's huge and slow test/unit.">.

|FYI I submitted this as a feature request to Ryan Davis on the Rubyforge site and he rejected the request. I am resubmitting it here because I feel it is quite important and trivial to implement.

Your proposal seems reasonable, but since Ryan rejected (and he is the
maintainer), he must have his own reason to reject. You have to
persuade Ryan anyway. Could you show us his reason to reject?

						matz.

=end

Actions #2

Updated by zenspider (Ryan Davis) about 15 years ago

  • Priority changed from Normal to 3

=begin
Mommy says no so you go ask Daddy? Nice end run. Still no.
=end

Actions #3

Updated by djberg96 (Daniel Berger) about 15 years ago

=begin
Instead of relying on whitespace, I recommend a diff style of output. Kouhei implemented this in Test::Unit 2.x and it's great.

diff:

  • minitest/unit is a small and fast replaecment for ruby's huge and slow test/unit
    ? -
  • minitest/unit is a small and fast replacement for ruby's huge and slow test/unit
    ? +
    =end
Actions #4

Updated by matz (Yukihiro Matsumoto) about 15 years ago

=begin
Hi,

In message "Re: [ruby-core:22666] [Feature #1193] Justified Error Messages"
on Thu, 5 Mar 2009 05:12:09 +0900, Ryan Davis writes:

|Mommy says no so you go ask Daddy? Nice end run. Still no.

But Daddy wants to know the reason. Could you briefly explain please?
For the record, I don't push you in any way, Ryan. I just want to know.

						matz.

=end

Actions #5

Updated by bahuvrihi (Simon Chiang) about 15 years ago

=begin
Sorry for a long delay in response. Ryan gave me no reason and directed me at his unit_diff utility from ZenTest. The original ticket is here:

http://rubyforge.org/tracker/?func=detail&atid=4097&aid=23842&group_id=1040

As an FYI, I decided to re-post the request here because a response Ryan made to a different ticket made me (apparently mistakenly) believe that Ruby was maintaining a separate fork of MiniTest. The conversation is here:

http://rubyforge.org/tracker/?func=detail&atid=4097&aid=22274&group_id=1040

Thanks for looking at this.
=end

Actions #6

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago

  • Category set to lib
  • Assignee set to zenspider (Ryan Davis)

=begin

=end

Actions #7

Updated by mame (Yusuke Endoh) about 14 years ago

  • Priority changed from 3 to Normal

=begin
Hi,

One nice thing about Test::Unit output is that failures are justified making string comparisons easier.

You may want to take a look at the thread from [ruby-core:18905].

Anyway, Ryan has a duty to reply this ticket.

--
Yusuke Endoh
=end

Actions #8

Updated by znz (Kazuhiro NISHIYAMA) about 14 years ago

  • Status changed from Open to Assigned
  • Target version set to 2.0.0

=begin

=end

Updated by zenspider (Ryan Davis) almost 13 years ago

  • Status changed from Assigned to Closed

The latest minitest's assert_equal uses diff where appropriate.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0