6 h2. Upgrading the RSpec gem
12 h2. Upgrading Spec::Rails
14 If you're upgrading Spec::Rails in an existing application, you should do the following.
15 Note that the last step will try to replace spec/spec.opts and spec/spec_helper.rb. If you
16 have modified those files you'll want to save them aside in advance and then merge in
20 # from the root of your rails project
21 rm -rf vendor/plugins/rspec
22 rm -rf vendor/plugins/rspec_on_rails
23 ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec
24 ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails
25 ruby script/generate rspec
28 %{font-weight:bold; color:red}WARNING%: Depending on the last time you upgraded, there may be a call to an experimental method
29 named raise_controller_errors in spec_helper.rb. As long as you follow the upgrade instructions
30 above, this will be removed, however if you skip the last step (ruby script/generate rspec), then
31 you'll need to manually remove this from spec_helper.rb.
33 h2. Upgrading from RSpec 0.8.x or earlier
35 In order to ease the transition from 0.8 style specs to the current style (introduced
36 in 0.9), we have included a translator to automate this translation.
38 The translator is not perfect, but we feel it's "good enough". It will
39 translate roughly 95% or more of your specs correctly, and you should
40 expect some manual work. Make sure all of your examples are green before
43 After installing the gem, you should run:
46 spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir
49 (or alternatively, if you have your code under version control and can
50 do a revert if things go wrong:)
53 spec_translator path_to_my_spec_dir path_to_my_spec_dir
56 (This will translate your specs in-place)
58 For convenience, we have also made the translator available as a Rake task in Spec::Rails