diff options
| author | mo khan <mo.khan@gmail.com> | 2020-04-02 15:11:12 +0000 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-04-02 15:11:12 +0000 |
| commit | 2d200e2bcecb91eadc5ee211f5bb65aafa645054 (patch) | |
| tree | 9749333a7c8878b833b4642afe3071cf1c14012c /spec/support/matchers.rb | |
| parent | 43bcbbd04342faa497725c5b0be3c6d944d850da (diff) | |
| parent | bfd7459419921ff37ee500f0698862eea6788675 (diff) | |
Merge branch '10128-go-modules' into 'master'v3.5.0
Improve license detection in go modules projects
See merge request gitlab-org/security-products/license-management!129
Diffstat (limited to 'spec/support/matchers.rb')
| -rw-r--r-- | spec/support/matchers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 595cd17..66bb92c 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -2,8 +2,9 @@ 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 end + match do |actual| - !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual)).empty? + !actual.nil? && (@errors = JSON::Validator.fully_validate(schema_for(version), actual.to_h)).empty? end failure_message do |response| |
