On Sun, Nov 29, 2009 at 12:33 AM, rogerdpack <rogerpack2...@gmail.com>wrote:

> It is somewhat surprising to me, as a newbie, to have to assert
> a.should be_a(Hash)
>
> That extra space in there feels awkward.
>
> Suggestion:
>
> allow for constructs like
> a.should.be_a(Hash)
>
> Thoughts?
>

You're about 4 years late to the party. We were playing around with a
variety of options back in 2005 and went with the current syntax because it
gave us the most flexibility and the highest level of decoupling, making it
easier for others to create their own matcher libraries. While it would be
technically feasible to support should.matcher, doing so now would cause
more confusion for more people than be helpful, IMO.

If you're really excited about that syntax (with the dots), there are other
frameworks (test/spec and expectations to name two) that use it or something
similar, so you might want to give those a peek as well.

Good luck!

Cheers,
David


> Much thanks.
> -r
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to