Skip to content

A Ruby script that helps you ease the migration process from rspec dobules ro rr trying to reduce your manual work

Notifications You must be signed in to change notification settings

dcadenas/rspec2rr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rspec2rr

DESCRIPTION:

rspec2rr is a Ruby script that helps you ease the migration process from rspec dobules ro rr (github.com/btakita/rr/tree/master) trying to reduce your manual work

FEATURES/PROBLEMS:

The script is just a set of regular expressions thay map to the most common used rspec doubles (I know, that’s quite arbitrary but you are always invited to contribute!!). So you will probably still need to do some manual conversions.

SYNOPSIS:

  • First of all check that you setup your spec_helper.rb to use RR. After this run your specs and you will see a lot of errors because your spec doubles are still in RSpec syntax.

  • Check that you have all your specs commited so you can go back to the previous state if you need to.

  • Run rspec2rr in your project root dir. Only *_spec.rb files inside the spec directory will be changed. After that rerun your specs and fix any remaining broken spec.

REQUIREMENTS:

None to run the script. To run the specs and rake tasks you’ll need:

  • hoe

  • rspec

  • filetesthelper

INSTALL:

sudo gem install dcadenas-rspec2rr

LICENSE:

(The MIT License)

Copyright © 2008 Daniel Cadenas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A Ruby script that helps you ease the migration process from rspec dobules ro rr trying to reduce your manual work

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages