Greg Donald wrote:
> On Mon, Aug 23, 2010 at 12:37 PM, Marnen Laibow-Koser
> <[email protected]> wrote:
>> It is my experience, and that of a large number
>> of other Rails developers, that using RSpec leads to more readable and
>> maintainable tests
> 
> They both do the exact same thing.  The assertion syntax is nearly
> identical.  RSpec just requires that you type a lot more to do the
> same job.
> 
>> that focus more on behavior and less on
>> implementation. �I don't see a single advantage of Test::Unit over RSpec
>> (except for the trivial one of its being included with Rails),
> 
> I personally don't see the need to type all that extra RSpec syntax
> when I can type much simpler tests using Test::Unit.

I've never been able to write or seen anyone else write Test::Unit tests 
that were actually readable and maintainable.  RSpec's extra syntax 
encourages a different style of test that is readable.

>  If RSpec were so
> great, why is it still not the default, even with Rails3?

Who knows?  I can't speak for the core team.  My guess -- and it *is* a 
guess -- is that it's because the Rails core team has a bad case of Not 
Invented Here syndrome in some respects.  This is nicely fed into by the 
assumptions of many Rails developers that the core team's decisions are 
perfect and needn't be questioned.

> 
>> whereas
>> RSpec has huge advantages over Test::Unit as I outlined above, as well
>> as probably being more beginner-friendly.
> 
> What advantages?  They both do the _exact same thing_, the main
> difference is the syntax, one is smaller one is bigger.

Correct.  The RSpec syntax encourages a different style of writing 
tests.

>  I'll stick
> with the one that requires less work.

So will I.  That would be RSpec.  The extra typing is trivial compared 
to the advantage of actually having tests that don't require elaborate 
deciphering 6 months later.

> 
> 
> --
> Greg Donald
> destiney.com | gregdonald.com

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone
-- 
Posted via http://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.

Reply via email to