summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/fixture_file_helper.rb2
-rw-r--r--spec/support/integration_test_helper.rb2
-rw-r--r--spec/support/matchers.rb4
-rw-r--r--spec/support/shared.rb4
4 files changed, 10 insertions, 2 deletions
diff --git a/spec/support/fixture_file_helper.rb b/spec/support/fixture_file_helper.rb
index 5a9599f..6905f02 100644
--- a/spec/support/fixture_file_helper.rb
+++ b/spec/support/fixture_file_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module FixtureFileHelper
def fixture_file_content(path, data = {})
content = IO.read(fixture_file(path))
diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb
index 52693f2..d1ff14a 100644
--- a/spec/support/integration_test_helper.rb
+++ b/spec/support/integration_test_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module IntegrationTestHelper
class Report
attr_reader :report
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index 66bb92c..038c593 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :match_schema do |version: '2.0'|
def schema_for(version)
License::Management.root.join("spec/fixtures/schema/v#{version}.json").to_s
@@ -7,7 +9,7 @@ RSpec::Matchers.define :match_schema do |version: '2.0'|
!actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual.to_h)).empty?
end
- failure_message do |response|
+ failure_message do |_response|
"didn't match the schema for version #{version}" \
" The validation errors were:\n#{@errors.join("\n")}"
end
diff --git a/spec/support/shared.rb b/spec/support/shared.rb
index 51b161a..2e84dd2 100644
--- a/spec/support/shared.rb
+++ b/spec/support/shared.rb
@@ -1,4 +1,6 @@
-RSpec.shared_examples "each report version" do |language, package_manager, branch = 'master'|
+# frozen_string_literal: true
+
+RSpec.shared_examples 'each report version' do |language, package_manager, branch = 'master'|
['1.0', '1.1', '2.0'].each do |version|
context "when generating a `#{version}` report for #{package_manager}" do
let(:url) { "https://gitlab.com/gitlab-org/security-products/tests/#{language}-#{package_manager}.git" }