Posted almost 12 years ago. Visible to the public.

Migrating to RSpec 2 from RSpec 1

You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to get started:

  • In RSpec 2 the executable is rspec, not spec.
  • RSpec and rspec-rails have been completely refactored internally. All RSpec classes have been renamed from Spec::Something to RSpec::Something. This also means that every require 'spec/something' must now be require 'rspec/something'.
  • In spec_helper.rb, Spec::Runner.configure becomes RSpec.configure
  • It has become really hard to extend specific example groups in rspec-rails (e.g. only controller example groups). Your existing example macros will probably break for this reason. Save yourself the trouble and attach all your macros to RSpec::Core::ExampleGroup instead.
  • Your spec_candy.rb will break. We have a working update in the repository "why", branch "rails3". We will update the note soon.
  • rspec_spinner does not yet work with RSpec 2. We will update the gem soon.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Henning Koch
Last edit:
over 5 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more