[rspec-users] Test::Unit to RSpec

David Rice davidjrice at gmail.com
Thu Aug 23 15:58:32 EDT 2007


On 23 Aug 2007, at 20:23, Scott Taylor wrote:

>
> 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?
>

Totally :) Yeah there's so many different syntax variants that it  
becomes hard across testing styles.
Especially now that all of my test suites are converted over to  
RSpec... I really don't think the complexity is worth it because for  
the people that use the tool it instantly becomes useless after they  
are "converted".

> 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)?
>

No problem! Yeah the original was very interesting to look at once I  
realised it did exist and wasn't a dream ( I went on a fruitless hunt  
before rolling my own ).

> 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
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

---
David Rice
+44 (0)78 708 12996
http://www.davidjrice.co.uk




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070823/f907eef5/attachment-0001.html 


More information about the rspec-users mailing list