Skip to content

Instantly share code, notes, and snippets.

@bernardeli
Created April 3, 2012 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bernardeli/2295266 to your computer and use it in GitHub Desktop.
Save bernardeli/2295266 to your computer and use it in GitHub Desktop.
sed to replace FactoryGirl old style to the new one on OS X
sed -i.bkp s/Factory\(\:/FactoryGirl.create\(\:/g spec/**/*.rb
sed -i.bkp s/Factory\ \:/FactoryGirl.create\ \:/g spec/**/*.rb
sed -i.bkp s/Factory\.build\ \:/FactoryGirl.build\ \:/g spec/**/*.rb
sed -i.bkp s/Factory\.build\(\:/FactoryGirl.build\(\:/g spec/**/*.rb
sed -i.bkp s/Factory\.next/FactoryGirl\.generate/g spec/**/*.rb
rm -rf spec/**/*.bkp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment