aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorBruno Perles2015-12-16 10:02:29 +0100
committerBruno Perles2015-12-16 10:02:29 +0100
commit013f4fa8fe9bb08f3ed1d15f905ca2a8437d6aa7 (patch)
tree426b9c17167c10547da2222517cbd4433ae554fe /spec/support
parent2590606c5912a85b8cb1aaa40c57dab67d75e7f7 (diff)
downloadchouette-core-013f4fa8fe9bb08f3ed1d15f905ca2a8437d6aa7.tar.bz2
Add route_sections for traces
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/fake_iev_server.rb15
-rw-r--r--spec/support/referential.rb8
2 files changed, 7 insertions, 16 deletions
diff --git a/spec/support/fake_iev_server.rb b/spec/support/fake_iev_server.rb
index c311fdc91..8cd002fae 100644
--- a/spec/support/fake_iev_server.rb
+++ b/spec/support/fake_iev_server.rb
@@ -10,17 +10,11 @@ end
# Importer
############
# get list
-fixture_request :get,
- "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs?action=importer",
- 'scheduled_jobs.json'
+fixture_request :get, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs?action=importer", 'scheduled_jobs.json'
# get element
-fixture_request :get,
- "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/1?action=importer",
- 'scheduled_job.json'
+fixture_request :get, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/1?action=importer", 'scheduled_job.json'
# post element
-fixture_request :post,
- "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/",
- 'scheduled_job.json'
+fixture_request :post, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/", 'scheduled_job.json'
# Optionnels
# delete element
@@ -36,6 +30,3 @@ fixture_request :post,
############
# Validation
############
-
-
-
diff --git a/spec/support/referential.rb b/spec/support/referential.rb
index d77a05f41..8c468eb53 100644
--- a/spec/support/referential.rb
+++ b/spec/support/referential.rb
@@ -12,7 +12,7 @@ module ReferentialHelper
end
module ClassMethods
-
+
def assign_referential
before(:each) do
assign :referential, referential
@@ -34,7 +34,7 @@ RSpec.configure do |config|
config.before(:suite) do
# Clean all tables to start
- DatabaseCleaner.clean_with :truncation
+ DatabaseCleaner.clean_with :truncation, except: %w[spatial_ref_sys]
# Truncating doesn't drop schemas, ensure we're clean here, first *may not* exist
Apartment::Tenant.drop('first') rescue nil
# Create the default tenant for our tests
@@ -49,7 +49,7 @@ RSpec.configure do |config|
end
config.before(:each, :js => true) do
- DatabaseCleaner.strategy = :truncation
+ DatabaseCleaner.strategy = :truncation, { except: %w[spatial_ref_sys] }
end
config.before(:each) do
@@ -61,6 +61,6 @@ RSpec.configure do |config|
Apartment::Tenant.reset
# Rollback transaction
DatabaseCleaner.clean
- end
+ end
end