Trying the next release of rspec, I have had to make changes in the
existing specs for routing.
I have written an script with sed that makes this automatically (two
files)


spec/upgrade.sed
================
/route_for/s/id => 1/id => "1"/g
/route_for.*create/s/== \(["'].*["']\)/== {:path => \1, :method =>
:post}/
/route_for.*update/s/== \(["'].*["']\)/== {:path => \1, :method =>
:put}/
/route_for.*destroy/s/== \(["'].*["']\)/== {:path => \1, :method =>
:delete}/


and
spec/upgrade
============
for f in `find controllers -name "*routing*rb" -type f`; do sed -i -f
upgrade.sed $f; done


You shoud make this file executable and run it

I hope this helps somebody.
Juanma
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to