Forum: Ruby [ANN] Dfect 0.0.0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bc368ef524130e8d0deb386de961e24a?d=identicon&s=25 Suraj Kurapati (snk)
on 2009-04-13 20:23
                            Dfect 0.0.0

                Assertion testing library for Ruby

                http://snk.tuxfamily.org/lib/dfect

   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-forum.com/topic/183354#801895
Bc368ef524130e8d0deb386de961e24a?d=identicon&s=25 Suraj Kurapati (snk)
on 2009-04-13 20:35
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.
B1b1d33e0655e841d4fd8467359c58d0?d=identicon&s=25 Yossef Mendelssohn (Guest)
on 2009-04-13 20:46
(Received via mailing list)
On Apr 13, 1:23 pm, Suraj Kurapati <s...@gna.org> wrote:
>                             Dfect 0.0.0
>
>                 Assertion testing library for Ruby
>
>                http://snk.tuxfamily.org/lib/dfect
>
>    Dfect is an assertion testing library for Ruby that
>    emphasizes a simple assertion vocabulary, instant
>    debuggability of failures, and flexibility in composing
>    tests.

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?
Bc368ef524130e8d0deb386de961e24a?d=identicon&s=25 Suraj Kurapati (snk)
on 2009-04-13 21:02
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. :-)
47b1910084592eb77a032bc7d8d1a84e?d=identicon&s=25 Joel VanderWerf (Guest)
on 2009-04-13 21:20
(Received via mailing list)
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 :)
This topic is locked and can not be replied to.