[rspec-devel] [ rspec-Feature Requests-10823 ] separate errors and failures in output

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 18 23:58:34 EST 2007


Feature Requests item #10823, was opened at 2007-05-14 09:07
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10823&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: Nobody (None)
Summary: separate errors and failures in output

Initial Comment:
Observe the following output:

=========================
$ spec user_spec.rb --format specdoc

User
- should be in any roles assigned to it (ERROR - 1)
- should NOT be in any roles not assigned to it (FAILED - 2)

1)
NameError in 'User should be in any roles assigned to it'
undefined local variable or method `user' for #<#<Class:0x14eca2c>:0x14ec6a8>
./user_spec.rb:6:

2)
'User should NOT be in any roles not assigned to it' FAILED
expected in_role?("unassigned role") to return false, got true
./user_spec.rb:12:

Finished in 0.017713 seconds

2 examples, 2 failures
=========================

The specdoc output makes a distinction between errors that are raised (ERROR - 1) and logical failures (FAILED - 2), but the last line of the output does not (2 examples, 2 failures).

The last line should make the distinction the same way the detailed output does:

2 examples, 1 failure, 1 error


----------------------------------------------------------------------

Comment By: Chad Humphries (spicycode)
Date: 2007-11-18 23:58

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/90-10823-separate-errors-and-failures-in-output#ticket-90-2

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-07-10 14:44

Message:
Currently we only output the pending count when there are 1 or more pending. Failure count is always outputted, even when there are 0 (which is inconsistent with pending). How should we print out errors?

I think we should choose between one of the following:

a) Always print examples, only print errors/failures/pending inf > 0.

b) Always print all of them. This will probably make it a little easier for tools that wish to parse the output (like autotest)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10823&group_id=797


More information about the rspec-devel mailing list