Feature #1193
Justified Error Messages
| Status: | Closed | Start date: | 02/23/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | lib | |||
| Target version: | 2.0.0 |
Description
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.
History
Updated by matz (Yukihiro Matsumoto) about 3 years ago
Hi, In message "Re: [ruby-core:22333] [Feature #1193] Justified Error Messages" on Mon, 23 Feb 2009 01:44:46 +0900, Simon Chiang <redmine@ruby-lang.org> 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.
Updated by zenspider (Ryan Davis) about 3 years ago
- Priority changed from Normal to Low
Mommy says no so you go ask Daddy? Nice end run. Still no.
Updated by djberg96 (Daniel Berger) about 3 years ago
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 ? +
Updated by matz (Yukihiro Matsumoto) about 3 years ago
Hi, In message "Re: [ruby-core:22666] [Feature #1193] Justified Error Messages" on Thu, 5 Mar 2009 05:12:09 +0900, Ryan Davis <redmine@ruby-lang.org> 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.
Updated by bahuvrihi (Simon Chiang) about 3 years ago
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.
Updated by marcandre (Marc-Andre Lafortune) over 2 years ago
- Category set to lib
- Assignee set to zenspider (Ryan Davis)
Updated by mame (Yusuke Endoh) about 2 years ago
- Priority changed from Low to Normal
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 <mame@tsg.ne.jp>
Updated by znz (Kazuhiro NISHIYAMA) about 2 years ago
- Status changed from Open to Assigned
- Target version set to 2.0.0
Updated by zenspider (Ryan Davis) 10 months ago
- Status changed from Assigned to Closed
The latest minitest's assert_equal uses diff where appropriate.