[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] minitest 1.3.0 Released

Ryan Davis

10/10/2008 8:22:00 AM


minitest version 1.3.0 has been released!

* <http://rubyforge.org/project...

minitest/unit is a small and fast replacement for ruby's huge and slow
test/unit. This is meant to be clean and easy to use both as a regular
test writer and for language implementors that need a minimal set of
methods to bootstrap a working unit test suite.

mini/spec is a functionally complete spec engine.

mini/mock, by Steven Baker, is a beautifully tiny mock object framework.

(This package was called miniunit once upon a time)

Changes:

### 1.3.0 / 2008-10-09

* 2 major enhancements:

* renamed to minitest and pulled out test/unit compatibility.
* mini/test.rb is now minitest/unit.rb, everything else maps
directly.

* 12 minor enhancements:

* assert_match now checks that act can call =~ and converts exp to a
regexp only if needed.
* Added assert_send... seems useless to me tho.
* message now forces to string... ruby-core likes to pass classes
and arrays :(
* Added -v handling and switched to @verbose from $DEBUG.
* Verbose output now includes test class name and adds a sortable
running time!
* Switched message generation into procs for message deferment.
* Added skip and renamed fail to flunk.
* Improved output failure messages for assert_instance_of,
assert_kind_of
* Improved output for assert_respond_to, assert_same.
* at_exit now exits false instead of errors+failures.
* Made the tests happier and more readable imhfo.
* Switched index(s) == 0 to rindex(s, 0) on nobu's suggestion.
Faster.

* 5 bug fixes:

* 1.9: Added encoding normalization in mu_pp.
* 1.9: Fixed backtrace filtering (BTs are expanded now)
* Added back exception_details to assert_raises. DOH.
* Fixed shadowed variable in mock.rb
* Fixed stupid muscle memory message bug in assert_send.

* <http://rubyforge.org/project...


3 Answers

Lin Jen-Shin

11/5/2008 8:59:00 AM

0

I am sorry, but I encounter a dependency problem.

"rfeedparser" depends on "character-encodings",
and "hpricot" would load 'encoding/character/utf-8' if
available through:

begin
require 'encoding/character/utf-8'
rescue LoadError
end

Then ::Encoding would be defined, and there's no
default_external in ::Encoding!

Err, do you mind check RUBY_VERSION? or
if Encoding.respond_to?(:default_external) or
something like that?

Thanks!

On Oct 10, 4:21=A0pm, Ryan Davis <ryand-r...@zenspider.com> wrote:
> minitestversion 1.3.0 has been released!
>
> * <http://rubyforge.org/project...
>
> minitest/unit is a small and fast replacement for ruby's huge and slow
> test/unit. This is meant to be clean and easy to use both as a regular
> test writer and for language implementors that need a minimal set of
> methods to bootstrap a working unit test suite.
>
> mini/spec is a functionally complete spec engine.
>
> mini/mock, by Steven Baker, is a beautifully tiny mock object framework.
>
> (This package was called miniunit once upon a time)
>
> Changes:
>
> ### 1.3.0 / 2008-10-09
>
> * 2 major enhancements:
>
> =A0 =A0* renamed tominitestand pulled out test/unit compatibility.
> =A0 =A0* mini/test.rb is nowminitest/unit.rb, everything else maps =A0
> directly.
>
> * 12 minor enhancements:
>
> =A0 =A0* assert_match now checks that act can call =3D~ and converts exp =
to a
> =A0 =A0 =A0regexp only if needed.
> =A0 =A0* Added assert_send... seems useless to me tho.
> =A0 =A0* message now forces to string... ruby-core likes to pass classes =
=A0
> and arrays :(
> =A0 =A0* Added -v handling and switched to @verbose from $DEBUG.
> =A0 =A0* Verbose output now includes test class name and adds a sortable =
=A0
> running time!
> =A0 =A0* Switched message generation into procs for message deferment.
> =A0 =A0* Added skip and renamed fail to flunk.
> =A0 =A0* Improved output failure messages for assert_instance_of, =A0
> assert_kind_of
> =A0 =A0* Improved output for assert_respond_to, assert_same.
> =A0 =A0* at_exit now exits false instead of errors+failures.
> =A0 =A0* Made the tests happier and more readable imhfo.
> =A0 =A0* Switched index(s) =3D=3D 0 to rindex(s, 0) on nobu's suggestion.=
=A0
> Faster.
>
> * 5 bug fixes:
>
> =A0 =A0* 1.9: Added encoding normalization in mu_pp.
> =A0 =A0* 1.9: Fixed backtrace filtering (BTs are expanded now)
> =A0 =A0* Added back exception_details to assert_raises. DOH.
> =A0 =A0* Fixed shadowed variable in mock.rb
> =A0 =A0* Fixed stupid muscle memory message bug in assert_send.
>
> * <http://rubyforge.org/project...

Ryan Davis

11/5/2008 9:03:00 AM

0


On Nov 5, 2008, at 01:00 , Lin Jen-Shin wrote:

> I am sorry, but I encounter a dependency problem.
>
> "rfeedparser" depends on "character-encodings",
> and "hpricot" would load 'encoding/character/utf-8' if
> available through:

what does this have to do with minitest?


Lin Jen-Shin

11/5/2008 9:22:00 AM

0

On Nov 5, 5:03=A0pm, Ryan Davis <ryand-r...@zenspider.com> wrote:
> On Nov 5, 2008, at 01:00 , Lin Jen-Shin wrote:
>
> > I am sorry, but I encounter a dependency problem.
>
> > "rfeedparser" depends on "character-encodings",
> > and "hpricot" would load 'encoding/character/utf-8' if
> > available through:
>
> what does this have to do with minitest?

in minitest-1.3.0/lib/minitest/unit.rb: 43

s =3D s.force_encoding(Encoding.default_external) if defined? Encoding

minitest called Encoding.default_external if
Encoding was defined, but if hpricot was required,
and character-encodings was installed, Encoding
would be defined even if there's no default_external.

My tests failed because there's no default_external in
Encoding.

Sorry for the noise if this was not an issue in trunk,
or you do think it should be fixed in character-encodings.

Thanks anyway.