summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-11 19:03:07 -0600
committermo khan <mo.khan@gmail.com>2020-04-11 19:03:07 -0600
commitb1e61fc752de499106d2bef898648e8d058abc2d (patch)
tree0b3e777ac06c72280e585a4f0c653d0ff425448d
parent3af4debce4dbb53e35d723bfc8208aadbcd110ee (diff)
Convert json to table format for easier to read diff
-rw-r--r--spec/fixtures/composer/composer.lock.expected59
-rw-r--r--spec/integration/cli/scan_spec.rb4
2 files changed, 9 insertions, 54 deletions
diff --git a/spec/fixtures/composer/composer.lock.expected b/spec/fixtures/composer/composer.lock.expected
index ca84315..3986e08 100644
--- a/spec/fixtures/composer/composer.lock.expected
+++ b/spec/fixtures/composer/composer.lock.expected
@@ -1,52 +1,7 @@
-{
- "version": "1.0",
- "dependencies": [
- {
- "name": "doctrine/instantiator",
- "version": "1.3.0",
- "licenses": [
- "MIT"
- ]
- },
- {
- "name": "hamcrest/hamcrest-php",
- "version": "v2.0.0",
- "licenses": []
- },
- {
- "name": "mockery/mockery",
- "version": "1.3.1",
- "licenses": [
- "BSD-3-Clause"
- ]
- },
- {
- "name": "phpdocumentor/reflection-common",
- "version": "2.0.0",
- "licenses": [
- "MIT"
- ]
- },
- {
- "name": "phpdocumentor/type-resolver",
- "version": "1.0.1",
- "licenses": [
- "MIT"
- ]
- },
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.14.0",
- "licenses": [
- "MIT"
- ]
- },
- {
- "name": "webmozart/assert",
- "version": "1.7.0",
- "licenses": [
- "MIT"
- ]
- }
- ]
-} \ No newline at end of file
+doctrine/instantiator 1.3.0 MIT
+hamcrest/hamcrest-php v2.0.0 Nonstandard
+mockery/mockery 1.3.1 BSD-3-Clause
+phpdocumentor/reflection-common 2.0.0 MIT
+phpdocumentor/type-resolver 1.0.1 MIT
+symfony/polyfill-ctype v1.14.0 MIT
+webmozart/assert 1.7.0 MIT
diff --git a/spec/integration/cli/scan_spec.rb b/spec/integration/cli/scan_spec.rb
index 79d45aa..4d82a8f 100644
--- a/spec/integration/cli/scan_spec.rb
+++ b/spec/integration/cli/scan_spec.rb
@@ -90,8 +90,8 @@ RSpec.describe '`spandx scan` command', type: :cli do
it 'executes `spandx scan composer.lock`' do
lockfile = fixture_file('composer/composer.lock')
- output = `spandx scan #{lockfile} --format=json`
+ output = `spandx scan #{lockfile}`
- expect(JSON.parse(output)).to eq(JSON.parse(fixture_file_content('composer/composer.lock.expected')))
+ expect(output).to eq(fixture_file_content('composer/composer.lock.expected'))
end
end