[rspec-users] Test::Unit to RSpec

Scott Taylor mailing_lists at railsnewbie.com
Thu Aug 23 15:23:39 EDT 2007


On Aug 23, 2007, at 12:18 PM, David Rice wrote:

> Scott,
>
> There was a thread about this earlier... You might be interested in  
> this plugin I wrote. Kinda basic but worked for me.
>
> http://www.davidjrice.co.uk/articles/2007/8/12/ruby-on-rails-plugin- 
> test-unit-to-rspec-converter

Yeah - actually I saw it, and tried it out.  Although I can't lie -  
it didn't work well.  I can't imagine any translator really working  
well.  How would you add mocks + stubs + clear specifications + 1  
test-per-spec in a translator, and do it intelligently?

But, for what it's worth - it did what I expected it to do, and would  
be a good, but crude way, to translate a lot test::unit code to rspec.

Thanks for the tool (and have you looked into the old rspec one -  
test2spec, I believe it was called)?

Scott


>
> Best,
> Dave
>
>
> On 18 Aug 2007, at 09:38, Scott Taylor wrote:
>
>>
>> So I've just started working on a rails project which currently has
>> something like 7500 LOC.  All of the tests are written in Test::Unit,
>> although the test coverage is pretty poor: rcov says that 25% of the
>> code is covered, while rake stats shows the code to test ratio as
>> 1:0.1 (800 lines of test code).
>>
>> I guess I'm wondering what would generally be advisable here.  Is it
>> worth it to work on (or use) a test:unit => spec translator?  Should
>> I just start using rspec when I need to start writing code, and
>> perform regressions when need be?  Or is the project too big to even
>> consider using rspec?
>>
>> Thanks in advance for any experienced advice,
>>
>> Scott Taylor
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>
> ---
> David Rice
> http://www.davidjrice.co.uk
>
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list