house9

random code and what not

upgrading from rspec 2 to rspec 3

| Comments

I’ve spent the last few days upgrading a rails application from 4.1 to 4.2 and as part of the upgrade going from rspec 2.99 to 3.2.

The rspec upgrade was much easier than I had anticipated thanks to the transpec gem.

  • added the rspec-its gem to my Gemfile
  • then ran the transpec migration
1
2
3
4
gem install transpec
transpec --keep its --negative-form to_not
rspec spec
git commit -aeF .git/COMMIT_EDITMSG

Only a few minor tweaks were needed to my specs after the migration – the transpec is brilliant!

Comments