projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2761: diagnostics testing
[arvados.git]
/
apps
/
workbench
/
test
/
test_helper.rb
diff --git
a/apps/workbench/test/test_helper.rb
b/apps/workbench/test/test_helper.rb
index e833f970c02d211905cd504a4d7a25a13a25a016..7f23988837b8ced4d4343b16dc3a1993e68c211e 100644
(file)
--- a/
apps/workbench/test/test_helper.rb
+++ b/
apps/workbench/test/test_helper.rb
@@
-1,4
+1,5
@@
-ENV["RAILS_ENV"] = "test"
+ENV["RAILS_ENV"] = "test" if !ENV["RAILS_ENV"]
+
unless ENV["NO_COVERAGE_TEST"]
begin
require 'simplecov'
unless ENV["NO_COVERAGE_TEST"]
begin
require 'simplecov'
@@
-70,6
+71,9
@@
class ActiveSupport::TestCase
arvados_api_token: api_fixture('api_client_authorizations')[api_client_auth_name.to_s]['api_token']
}
end
arvados_api_token: api_fixture('api_client_authorizations')[api_client_auth_name.to_s]['api_token']
}
end
+ def json_response
+ Oj.load(@response.body)
+ end
end
class ApiServerForTests
end
class ApiServerForTests
@@
-148,4
+152,6
@@
class ApiServerForTests
end
end
end
end
-ApiServerForTests.run
+if ENV["RAILS_ENV"].eql? 'test'
+ ApiServerForTests.run
+end