ryanb / ruby-warrior

Game written in Ruby for learning Ruby.
MIT License
3.84k stars 837 forks source link

Update rspec #91

Closed dcki closed 6 months ago

dcki commented 8 years ago

I wasn't able to run tests out of the box, so I upgraded Rspec and started tracking my Gemfile.lock.

I changed "should" to "expect" to quiet deprecation warnings from Rspec. At first I did it by hand, but then went looking for scripts:

perl -p -i -e 's/^(\s+)(.*(?=.should))\.should(_)?(not)? (.*)$/$1expect($2).$4$3to $5/g' `find spec -name *.rb`

perl -p -i -e 's/ == (.*)$/ eq($1)/g' `find spec -name *.rb`

http://jakeboxer.com/blog/2012/07/09/converting-to-the-new-rspec-2-dot-11-expectation-syntax/

Please let me know what you would like to see done differently, but please try to let me know about as much as you can think of up front or any contribution rules or guidelines you might have as early as possible so I can avoid lots of rounds of revisions. (Had a bad experience with that recently.)

ryanb commented 6 months ago

Thanks for your work on this. Just saw this after I did it myself. Could have used your PR!