>
> Just about every line of that is hard to read IMHO. I find assert_equal
> a, b to look cryptic and require me to stop and think every time I see
> it. By contrast, a.should == b reads more like English (or idiomatic
> Ruby) and reads quickly and easily for me. (It's also less typing than
> the Test::Unit version.)
Sounds like a question of habit/personal preference to me - I can't
say I've ever found assert_equal hard to understand.
Personally I don't really care whether I write should or assert - you
can get the job done either way (although
http://pragdave.blogs.pragprog.com/pragdave/2008/03/the-language-in.html
is an interesting articles on DSLs trying to be too much like english)
and I find the mindset of the developer to be more important that the
test syntax used to express it.
Fred
>
> I'll post an RSpec version for comparison when I'm not typing on my
> phone. I don't know why you continue to torture yourself with assert_
> syntax. :)
>
> > --
> > Greg Donald
> > destiney.com | gregdonald.com
>
> Best,
>
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> [email protected]
>
> Sent from my iPhone
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.