Don't load test related tasks in other env

This commit is contained in:
Priit Tark 2015-01-20 10:25:08 +02:00
parent b527221baf
commit b3c0b5d824

View file

@ -1,4 +1,5 @@
begin
if Rails.env.test? || Rails.env.development?
require 'rspec/core/rake_task'
require 'open3'
@ -40,6 +41,7 @@ begin
`kill #{pid}`
end
end
end
rescue LoadError => e
puts e # rspec gem not loaded, probably we are in production machine
end