Skip to content

Instantly share code, notes, and snippets.

@no-itsbackpack
Last active September 28, 2015 19:59
Show Gist options
  • Save no-itsbackpack/ab854cb29fb379c33609 to your computer and use it in GitHub Desktop.
Save no-itsbackpack/ab854cb29fb379c33609 to your computer and use it in GitHub Desktop.
#test.rake
desc 'example rake test that only runs in dev and test'
namespace :test do
task :do_something do
if Rails.env.development? || Rails.env.test?
"do your stuff here"
end
end
end
# ./Rakefile
task test: %w(test:do_something)
task default: [:test]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment