[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] Dfect 0.0.0

Suraj Kurapati

4/13/2009 6:24:00 PM

Dfect 0.0.0

Assertion testing library for Ruby

http://snk.tuxfamily.org...

Dfect is an assertion testing library for Ruby that
emphasizes a simple assertion vocabulary, instant
debuggability of failures, and flexibility in composing
tests.

Version 0.0.0 (2009-04-13)

This is the first public release of Dfect, which was inspired
by [1]Philip Plumlee's musing on alternative names for
assertion methods.

References

1. http://www.ruby-...topic/183...
--
Posted via http://www.ruby-....

4 Answers

Suraj Kurapati

4/13/2009 6:35:00 PM

0

Suraj Kurapati wrote:
> inspired by [1]Philip Plumlee's musing on alternative names for
> assertion methods.

My apologies; I incorrectly attributed the musing to Philip Plumlee.
The correct author of that musing is Sean O'halpin.

Sorry for the confusion.
--
Posted via http://www.ruby-....

Yossef Mendelssohn

4/13/2009 6:46:00 PM

0

On Apr 13, 1:23=A0pm, Suraj Kurapati <s...@gna.org> wrote:
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Dfect 0.0.0
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Assertion testing library for Ruby
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0http://snk.tuxfamily.org...
>
> =A0 =A0Dfect is an assertion testing library for Ruby that
> =A0 =A0emphasizes a simple assertion vocabulary, instant
> =A0 =A0debuggability of failures, and flexibility in composing
> =A0 =A0tests.

I looked over the documentation. In my opinion, if you're defining
methods like <, >, <<, or >> and they need to be called with explicit
obj.< syntax, you're doing something wrong.

> Version 0.0.0 (2009-04-13)

Why do you keep releasing gems that start at version 0.0.0?

--
-yossef

Suraj Kurapati

4/13/2009 7:03:00 PM

0

Yossef Mendelssohn wrote:
> I looked over the documentation. In my opinion, if you're defining
> methods like <, >, <<, or >> and they need to be called with explicit
> obj.< syntax, you're doing something wrong.

Those particular methods are module functions which do not get mixed-in,
so there's no harm in having them that way. In fact, the only way to
access them from a mixed-in location is via the D constant:

# not mixed-in
Dfect .< { puts "hello" }
Dfect::D .< { puts "hello" }

# mixed-in
include Dfect
D .< { puts "hello" }

# not possible
include Dfect
self .< { puts "hello" } # no method error "<" for self!

As for providing a block to those methods, the alternative requires too
much typing for my taste:

D < lambda { puts "hello" }

>> Version 0.0.0 (2009-04-13)
>
> Why do you keep releasing gems that start at version 0.0.0?

Because the first number in computer science is 0. :-)
--
Posted via http://www.ruby-....

Joel VanderWerf

4/13/2009 7:20:00 PM

0

Suraj Kurapati wrote:
> Yossef Mendelssohn wrote:
>>> Version 0.0.0 (2009-04-13)
>> Why do you keep releasing gems that start at version 0.0.0?
>
> Because the first number in computer science is 0. :-)

0.0.0 should be reserved for the trivial gem, <<END
END

(not quite serious :)

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407