From f92a5213ba57f369814de738aaf38c4d203770f8 Mon Sep 17 00:00:00 2001
From: Jonathan Pastor <jonathancmoa@gmail.com>
Date: Fri, 27 Sep 2019 10:41:48 +0200
Subject: [PATCH] puts specs test in a spec folder; handle more stubbing URL

---
 {tests => spec}/oar_properties_spec.rb                           | 1 +
 {tests => spec}/spec_helper.rb                                   | 1 +
 .../stub_oar_properties/dump_oar_api_configured_server.json      | 0
 .../dump_oar_api_configured_server_with_disk.json                | 0
 .../stub_oar_properties/dump_oar_api_empty_server.json           | 0
 .../stub_oar_properties/load_data_hierarchy_stubbed_data.json    | 0
 .../load_data_hierarchy_stubbed_data_with_disk.json              | 0
 7 files changed, 2 insertions(+)
 rename {tests => spec}/oar_properties_spec.rb (99%)
 rename {tests => spec}/spec_helper.rb (90%)
 rename {tests => spec}/stub_oar_properties/dump_oar_api_configured_server.json (100%)
 rename {tests => spec}/stub_oar_properties/dump_oar_api_configured_server_with_disk.json (100%)
 rename {tests => spec}/stub_oar_properties/dump_oar_api_empty_server.json (100%)
 rename {tests => spec}/stub_oar_properties/load_data_hierarchy_stubbed_data.json (100%)
 rename {tests => spec}/stub_oar_properties/load_data_hierarchy_stubbed_data_with_disk.json (100%)

diff --git a/tests/oar_properties_spec.rb b/spec/oar_properties_spec.rb
similarity index 99%
rename from tests/oar_properties_spec.rb
rename to spec/oar_properties_spec.rb
index bd766e41b2..a1a75d3dd0 100644
--- a/tests/oar_properties_spec.rb
+++ b/spec/oar_properties_spec.rb
@@ -43,6 +43,7 @@ end
 stubbed_addresses = [
     "#{conf["uri"]}",
     "#{conf["uri"]}/oarapi/resources/details.json?limit=999999",
+    "#{conf["uri"]}stable/sites/fakesite/internal/oarapi/resources/details.json?limit=999999",
 ]
 
 
diff --git a/tests/spec_helper.rb b/spec/spec_helper.rb
similarity index 90%
rename from tests/spec_helper.rb
rename to spec/spec_helper.rb
index f0876afe76..425ea3ea8e 100644
--- a/tests/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,6 +3,7 @@ require 'simplecov'
 SimpleCov.start do
   add_filter '/tests/'
   add_filter '/bundle/'
+  add_filter '/spec/'
 end
 # This outputs the report to your public folder
 # You will want to add this to .gitignore
diff --git a/tests/stub_oar_properties/dump_oar_api_configured_server.json b/spec/stub_oar_properties/dump_oar_api_configured_server.json
similarity index 100%
rename from tests/stub_oar_properties/dump_oar_api_configured_server.json
rename to spec/stub_oar_properties/dump_oar_api_configured_server.json
diff --git a/tests/stub_oar_properties/dump_oar_api_configured_server_with_disk.json b/spec/stub_oar_properties/dump_oar_api_configured_server_with_disk.json
similarity index 100%
rename from tests/stub_oar_properties/dump_oar_api_configured_server_with_disk.json
rename to spec/stub_oar_properties/dump_oar_api_configured_server_with_disk.json
diff --git a/tests/stub_oar_properties/dump_oar_api_empty_server.json b/spec/stub_oar_properties/dump_oar_api_empty_server.json
similarity index 100%
rename from tests/stub_oar_properties/dump_oar_api_empty_server.json
rename to spec/stub_oar_properties/dump_oar_api_empty_server.json
diff --git a/tests/stub_oar_properties/load_data_hierarchy_stubbed_data.json b/spec/stub_oar_properties/load_data_hierarchy_stubbed_data.json
similarity index 100%
rename from tests/stub_oar_properties/load_data_hierarchy_stubbed_data.json
rename to spec/stub_oar_properties/load_data_hierarchy_stubbed_data.json
diff --git a/tests/stub_oar_properties/load_data_hierarchy_stubbed_data_with_disk.json b/spec/stub_oar_properties/load_data_hierarchy_stubbed_data_with_disk.json
similarity index 100%
rename from tests/stub_oar_properties/load_data_hierarchy_stubbed_data_with_disk.json
rename to spec/stub_oar_properties/load_data_hierarchy_stubbed_data_with_disk.json
-- 
GitLab