[ANN] turn 0.1.0 Released

T

Tim Pease

turn version 0.1.0 has been released!
Test::Unit Reporter New -- a new output format for Test::Unit


Turn this

..F.....

Into this

TestMyClass
test_alt PASS
test_alt_eq PASS
test_bad FAIL
./test/test_my_class.rb:64:in `test_bad'
<false> is not true.
test_foo PASS
test_foo_eq PASS
TestYourClass
test_method_a PASS
test_method_b PASS
test_method_c PASS
============================================================================
pass: 7, fail: 1, error: 0
total: 15 tests with 42 assertions in 0.018 seconds
============================================================================

By doing this

require 'turn'

And, if the 'facets' gem is installed (and your terminal supports ANSI color
codes) all this will be printed out in glorious and amazing technicolor!


Changes:

Version 0.1.0 / 2006-11-10

* initial release
 
V

Vincent Fourmond

Tim said:
turn version 0.1.0 has been released!
Test::Unit Reporter New -- a new output format for Test::Unit


Turn this

..F.....

Into this

TestMyClass
test_alt
PASS
test_alt_eq
PASS
test_bad
FAIL
./test/test_my_class.rb:64:in `test_bad'
<false> is not true.
test_foo
PASS
test_foo_eq
PASS
TestYourClass
test_method_a
PASS
test_method_b
PASS
test_method_c
PASS
============================================================================

pass: 7, fail: 1, error: 0
total: 15 tests with 42 assertions in 0.018 seconds
============================================================================

That definitely looks better ;-) ...

Vince
 
G

Gregory Seidman

On Sat, Nov 11, 2006 at 08:05:42AM +0900, Tim Pease wrote:
} turn version 0.1.0 has been released!
} Test::Unit Reporter New -- a new output format for Test::Unit
[...]
} By doing this
}
} require 'turn'
}
} And, if the 'facets' gem is installed (and your terminal supports ANSI color
} codes) all this will be printed out in glorious and amazing technicolor!
[...]

This is way cool and remarkably timely. Coincidentally, a coworker was
complaining about the way rails tests were reported about five minutes
before I read this announcement.

My only issue with it is its dependency on both the hoe and rubyforge gems.
Are these really necessary, or are they accidental artifacts? It seems to
work just fine if I remove them and remove the dependency on hoe in the
spec file. Could you remove the dependencies, please?

--Greg
 
T

Tim Pease

On Sat, Nov 11, 2006 at 08:05:42AM +0900, Tim Pease wrote:
} turn version 0.1.0 has been released!
} Test::Unit Reporter New -- a new output format for Test::Unit
[...]
} By doing this
}
} require 'turn'
}
} And, if the 'facets' gem is installed (and your terminal supports ANSI color
} codes) all this will be printed out in glorious and amazing technicolor!
[...]

This is way cool and remarkably timely. Coincidentally, a coworker was
complaining about the way rails tests were reported about five minutes
before I read this announcement.

My only issue with it is its dependency on both the hoe and rubyforge gems.
Are these really necessary, or are they accidental artifacts? It seems to
work just fine if I remove them and remove the dependency on hoe in the
spec file. Could you remove the dependencies, please?

Done, and done!

New release of turn-0.1.1 -- non dependency encumbered version. I
just put it out there, and it should be hitting the mirrors soon-ish.

I'm using Ryan Davis' hoe package (totally awesome stuff there), and
it makes itself a dependency when you build a gem unless you
explicitly say, "Hey, I don't want to depend on you. Go away!"

TwP
 
M

Mark Somerville

Looks great!

Does anyone know the best way of integrating this into a Rails project?

Bleh, ignore me. require 'turn' on line 4 of test/test_helper.rb seems to do
the trick.

Mark
 
E

Eric Hodel

My only issue with it is its dependency on both the hoe and
rubyforge gems.
Are these really necessary, or are they accidental artifacts? It
seems to
work just fine if I remove them and remove the dependency on hoe in
the
spec file. Could you remove the dependencies, please?

These are really necessary. How are you supposed to run any of the
rake tasks without Hoe?

Besides, why do you care? *Rubygems takes care of these things for
you.*

PS:

There's no reason to whine over the disk space:

$ du -hcd0 /usr/local/lib/ruby/gems/1.8/**/hoe-1.1.4/ /usr/local/lib/
ruby/gems/1.8/**/rubyforge-0.3.1/
104K /usr/local/lib/ruby/gems/1.8/doc/hoe-1.1.4/
40K /usr/local/lib/ruby/gems/1.8/gems/hoe-1.1.4/
1.2M /usr/local/lib/ruby/gems/1.8/doc/rubyforge-0.3.1/
112K /usr/local/lib/ruby/gems/1.8/gems/rubyforge-0.3.1/
1.4M total

Anybody who's disk is that small should simply nuke all their docs,
much better solution.
 
G

Gregory Seidman

29 PM, Gregory Seidman wrote:
} >My only issue with it is its dependency on both the hoe and rubyforge
} >gems. Are these really necessary, or are they accidental artifacts? It
} >seems to work just fine if I remove them and remove the dependency on
} >hoe in the spec file. Could you remove the dependencies, please?
}
} These are really necessary. How are you supposed to run any of the
} rake tasks without Hoe?

Pardon? Let me quote what I wrote above: "It seems to work just fine if I
remove them and remove the dependency on hoe in the spec file." In fact,
the author has now removed those dependencies, since they weren't actually
required.

} Besides, why do you care? *Rubygems takes care of these things for
} you.*
[...]

Well, gee, I could just install every single available Rubygem and that
would take care of it for me, too. But I don't *want* all of that
installed. I want to minimize what can affect the code I write, which means
minimizing the installed libraries.

} Eric Hodel - (e-mail address removed) - http://blog.segment7.net
--Greg
 
J

James Edward Gray II

turn version 0.1.0 has been released!
Test::Unit Reporter New -- a new output format for Test::Unit


Turn this

..F.....

Into this

TestMyClass

test_alt
PASS

test_alt_eq
PASS

test_bad
FAIL
./test/test_my_class.rb:64:in `test_bad'
<false> is not true.

I don't want to belittle this library, but just to be sure, users
should remember Test::Unit sports a --verbose option:

$ ruby -I lib:test test/tc_csv_parsing.rb
Loaded suite test/tc_csv_parsing
Started
.....
Finished in 0.008816 seconds.

5 tests, 83 assertions, 0 failures, 0 errors
$ ruby -I lib:test test/tc_csv_parsing.rb --verbose
Loaded suite test/tc_csv_parsing
Started
test_aras_edge_cases(TestCSVParsing): .
test_james_edge_cases(TestCSVParsing): .
test_malformed_csv(TestCSVParsing): .
test_mastering_regex_example(TestCSVParsing): .
test_std_lib_csv(TestCSVParsing): .

Finished in 0.008698 seconds.

5 tests, 83 assertions, 0 failures, 0 errors

James Edward Gray II
 
T

Tim Pease

I don't want to belittle this library, but just to be sure, users
should remember Test::Unit sports a --verbose option:

$ ruby -I lib:test test/tc_csv_parsing.rb
Loaded suite test/tc_csv_parsing
Started
.....
Finished in 0.008816 seconds.

5 tests, 83 assertions, 0 failures, 0 errors
$ ruby -I lib:test test/tc_csv_parsing.rb --verbose
Loaded suite test/tc_csv_parsing
Started
test_aras_edge_cases(TestCSVParsing): .
test_james_edge_cases(TestCSVParsing): .
test_malformed_csv(TestCSVParsing): .
test_mastering_regex_example(TestCSVParsing): .
test_std_lib_csv(TestCSVParsing): .

Finished in 0.008698 seconds.

5 tests, 83 assertions, 0 failures, 0 errors

The biggest difference between Test::Unit verbose mode and TURN output
is when failures are displayed. Test::Unit verbose mode and
non-verbose mode do the same thing -- display a "F" and then wait till
all tests complete before displaying detailed information.

TRUN will display the details of a failure immediately. I wanted this
feature because some of our tests take over ten minutes to complete
<yikes!>. That's pretty much the only reason TURN exists (and I like
pretty colors).

No belittling assumed, James :) I always appreciate your very
considered and insightful comments.

Blessings,
TwP
 
D

Daniel Berger

Tim said:
turn version 0.1.0 has been released!
Test::Unit Reporter New -- a new output format for Test::Unit

<snip>

Where are you hosting this Tim? I didn't see anythingon the RAA or
RubyForge. I'd just like a place to make suggestions.

One thing I'd like is to have a "turn" command (under ruby/bin) so
that, instead of having to stick 'require "turn"' in all of my tests, I
could just do "turn tc_foo.rb" and get your nicer output. Plus, that
gives me the option of running the tests without turn if I so choose.

I suppose that means two files - one for Windows (a .bat file), and one
for non-Windows.

Thanks,

Dan
 
T

Tim Pease

<snip>

Where are you hosting this Tim? I didn't see anythingon the RAA or
RubyForge. I'd just like a place to make suggestions.

It lives on RubyForge under the codeforpeople project (thanks Ara)
One thing I'd like is to have a "turn" command (under ruby/bin) so
that, instead of having to stick 'require "turn"' in all of my tests, I
could just do "turn tc_foo.rb" and get your nicer output. Plus, that
gives me the option of running the tests without turn if I so choose.

I suppose that means two files - one for Windows (a .bat file), and one
for non-Windows.

Wicked cool idea! As soon as I figure out Guy's mmap code, I'll get
cracking on that.
Thanks,

Dan

No problemo!

TwP
 
D

Daniel Berger

Tim said:
It lives on RubyForge under the codeforpeople project (thanks Ara)

Ah, yes. Whoops. Forgot. Thanks.
Wicked cool idea! As soon as I figure out Guy's mmap code, I'll get
cracking on that.

Whoa there. No need to get crazy. A simple shell/batch script that
lives in Ruby's bin directory will do. :)

I've posted the .bat file on the codeforpeople project page. Here it
is for those curious:

# turn.bat - put this in c:\ruby\bin
@echo off
"%~p0ruby" -x "%~f0" %1
goto endofruby
#!/bin/ruby
require "rubygems"
require "turn"
require ARGV[0] # The test file
:endofruby

The only quirk is that your test output will start with "Loaded suite
C:/ruby/bin/turn.bat" instead of the actual name of the test file.
Nothing serious.

Regards,

Dan
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top