Skip to content

Instantly share code, notes, and snippets.

@achamian
Created August 20, 2010 05:00
Show Gist options
  • Save achamian/539643 to your computer and use it in GitHub Desktop.
Save achamian/539643 to your computer and use it in GitHub Desktop.
#!/bin/sh
# replace all occurrences of
# require File.dirname(__FILE__) + "/../spec_helper"
# with
# require "spec_helper"
find ./**/*_spec.rb -type f | xargs sed -e 's/^require.*spec_helper.*$/require \"spec_helper\"/g' -i .sed.back
find ./**/*_spec.rb.sed.back -type f | xargs rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment