Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f0551652 authored by Lucas Nussbaum's avatar Lucas Nussbaum Committed by Jonathan Pastor
Browse files

Add support for running tests from anywhere, not just tests/

parent f5372855
No related branches found
No related tags found
1 merge request!6WIP: Features/oar gpus
......@@ -5,15 +5,17 @@ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
require 'refrepo'
require 'refrepo/gen/oar-properties'
STUBDIR = File.expand_path(File.dirname(__FILE__))
WebMock.disable_net_connect!(allow_localhost: true)
conf = RefRepo::Utils.get_api_config
def load_stub_file_content(stub_filename)
if not File.exist?("stub_oar_properties/#{stub_filename}")
raise("Cannot find #{stub_filename} in 'stub_oar_properties/'")
if not File.exist?("#{STUBDIR}/stub_oar_properties/#{stub_filename}")
raise("Cannot find #{stub_filename} in '#{STUBDIR}/stub_oar_properties/'")
end
file = File.open("stub_oar_properties/#{stub_filename}", "r")
file = File.open("#{STUBDIR}/stub_oar_properties/#{stub_filename}", "r")
lines = IO.read(file)
file.close()
return lines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment