Turn 0.1.0 Released

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’
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

Tim P. wrote:

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

That definitely looks better :wink:

Vince

On Sat, Nov 11, 2006 at 08:05:42AM +0900, Tim P. 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

On 11/10/06, Gregory S. [email protected] wrote:

[…]

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 D.’ 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

On Nov 10, 2006, at 4:29 PM, Gregory S. 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?

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.


Eric H. - [email protected] - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

On Friday 10 November 2006 23:05, Tim P. wrote:

By doing this

require ‘turn’

Looks great!

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

Mark

On Tue, Nov 14, 2006 at 07:06:41AM +0900, Eric H. wrote:
} On Nov 10, 2006, at 4:29 PM, Gregory S. 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 H. - [email protected] - http://blog.segment7.net
–Greg

I posted a patch to the tracker and did a ultra quick write up on my
blog here about humanizing the output to make it a little more like
rSpec’s spec:doc format.

My post is at http://spicycode.com/2006/11/14/turn-turn-turn

Thanks for turn!

-Chad

“Chad” [email protected] writes:

I posted a patch to the tracker and did a ultra quick write up on my
blog here about humanizing the output to make it a little more like
rSpec’s spec:doc format.

My post is at http://spicycode.com/2006/11/14/turn-turn-turn

Thanks for turn!

You may be interested in test/spec,
http://chneukirchen.org/blog/archive/2006/10/announcing-test-spec-0-2-a-bdd-interface-for-test-unit.html

Running with -rs results in output like

spec.output

  • works for print
  • works for puts
  • works with readline

It also handles test_unit_test_names.

On Nov 10, 2006, at 5:05 PM, Tim P. wrote:

TestMyClass
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 G. II

how i install ruby and webrick in ubuntu?

2006/11/14, James Edward G. II [email protected]:

On Nov 15, 2006, at 10:08 AM, Tim P. wrote:

TRUN will display the details of a failure immediately.

Oh nifty. I didn’t know that. I like it.

James Edward G. II

On 11/14/06, James Edward G. II [email protected] wrote:

5 tests, 83 assertions, 0 failures, 0 errors

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 :slight_smile: I always appreciate your very
considered and insightful comments.

Blessings,
TwP

Tim P. wrote:

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

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

On 11/17/06, Daniel B. [email protected] wrote:

Tim P. wrote:

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

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

Tim P. wrote:

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

Ah, yes. Whoops. Forgot. Thanks.

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, > > 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.

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

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

“Daniel B.” [email protected] writes:

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.

test/spec can do that as well, e.g.:

#606<3|>lilith:~/src/liquid$ specrb -s test/*test.rb

Variable

  • blankspace
  • variable beginning
  • variable end
  • variable many embedded fragments
  • variable middle
  • with block
    [snip!]

VariableResolution

  • hash scoping
  • ignore unknown
  • simple variable
  • simple with whitespaces

Finished in 3.990959 seconds.

182 specifications (433 requirements), 0 failures

And provides lots of other options useful for running tests as well:

#607<3|>lilith:~/src/liquid$ specrb -h
Usage: specrb [options] [files | -a] [-- untouched arguments]

Ruby options:
-e, --eval LINE evaluate a LINE of code
-d, --debug set debugging flags (set $DEBUG to true)
-w, --warn turn warnings on for your script
-I, --include PATH specify $LOAD_PATH (may be used more than
once)
-r, --require LIBRARY require the library, before executing your
script

test/spec options:
-s, --specdox do AgileDox-like output
–rdox do AgileDox-like output with RDoc formatting
-a, --automatic gather tests from ./test/

test/unit options:
-n, --name NAME runs tests matching regexp NAME
-t, --testcase TESTCASE runs tests in TestCases matching regexp
TESTCASE

Common options:
-h, --help Show this message
–version Show version

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs