Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Created November 15, 2013 20:42
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 myronmarston/7491219 to your computer and use it in GitHub Desktop.
Save myronmarston/7491219 to your computer and use it in GitHub Desktop.
In reply to: https://twitter.com/avdi/status/401429567250108416 Curious: how do you deal with app Rakefiles that you use in production but without the testing gems being available in prod? Gists welcome.
begin
require 'rspec/core/rake_task'
rspec_loaded = true
rescue LoadError
rspec_loaded = false
puts "\nThe spec tasks were not defined since rspec could not be loaded.\n\n"
end
if rspec_loaded
# define the tasks that depend on RSpec
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment