Testing your spec against multiple rubies
When you write a spec or some tests for an open source audience, you might want to test it against multiple Ruby versions.
Good thing that there is RVM which lets you switch rubies quickly, right? Well, RVM is even more awesome than you thought, because you can simply do this:
rvm 1.8.7,1.9.3 do bundle exec rake spec
Which will automatically run bundle exec rake spec
for the specified rubies, without you ever having to change the active one manually.
Merry testing.
Written by Lucas
Related protips
1 Response
There is a tool that automates the process a bit more: https://github.com/lsegal/rvm-tester and it has support for .travis.yml
.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#