mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Don't load test related tasks in other env
This commit is contained in:
parent
b527221baf
commit
b3c0b5d824
1 changed files with 34 additions and 32 deletions
|
@ -1,4 +1,5 @@
|
||||||
begin
|
begin
|
||||||
|
if Rails.env.test? || Rails.env.development?
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
require 'open3'
|
require 'open3'
|
||||||
|
|
||||||
|
@ -40,6 +41,7 @@ begin
|
||||||
`kill #{pid}`
|
`kill #{pid}`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
rescue LoadError => e
|
rescue LoadError => e
|
||||||
puts e # rspec gem not loaded, probably we are in production machine
|
puts e # rspec gem not loaded, probably we are in production machine
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue