[rspec-devel] Test2Spec's usefulness

David Lee david at davelee.com.au
Sun Oct 15 09:11:57 EDT 2006

Hi Aslak,

I had Parsetree 1.5 installed; probably that was my blocker issue.  

Maybe what's really needed here is a documentation update: the  
version dependency is not mentioned on http://rspec.rubyforge.org/ 
tools/test2spec.html ; i followed the docs there and just got a  
'could not convert' or similar error for each file attempted.

Also, if test2spec will require RSpec 0.6.4 that should probably be  
noted on the docs site.

I have set up my own rake tasks already, thanks.


On 15/10/2006, at 9:35 PM, aslak hellesoy wrote:

> On 10/15/06, David Lee <david at davelee.com.au> wrote:
>> Hi all,
>> Just thought I'd pipe in as I noticed you're decommissioning  
>> test2spec.
>> I don't doubt that it's a maintenance headache, and I couldn't get it
>> to work for me (converting my previous Rails tests to specs).
> It's been happily translating 90-95% of RSpec's unit tests.
> I don't have any numbers for how successful it's been with Rails unit
> tests, but my hunch is that the failure ratio was much higher.
>> However, it would have been really helpful for me, and would make
>> RSpec a viable option for a (large?) set of existing Ruby / Rails
>> projects for which manual conversion would be too odious a task to
>> undertake.
> You can still use test2spec by installing RSpec 0.6.4. The thing to
> bear in mind is that you need ParseTree 0.4.1 - it will not work with
> later versions.
> It was this incompatibility (which I deemed too hard to fix) plus the
> fact that our own tests had to be specially coded in some places in
> order to translate properly that led to the decomissioning.
>> I'm not really doing anything useful here, just flagging that I think
>> it is / would be a useful tool to have. Maybe it should wait though
>> until RSpec itself has settled down a little ...
>> Alternatively, a few Rake tasks to help people manage using both
>> Test::Unit & RSpec in parallel on Rails projects might be a useful
>> addition to the rails plugin, with minimal maintenance burden.
> You can already do that. Just install RSpec on Rails and define a  
> task:
> task :test_and_spec => :test, :spec
> You should tweak your spec_helper.rb so that it points to fixtures
> under test/fixtures rather than the default, which is spec/fixtures.
> Please continue posting any problems you have with test2spec - we'll
> help you troubleshoot it.
> HTH,
> Aslak
>> cheers,
>> David
>> _______________________________________________
>> rspec-devel mailing list
>> rspec-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-devel
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

More information about the rspec-devel mailing list