Skip to content

Commit 313ef44

Browse files
committed
Adds coverage for specifying the output path
Signed-off-by: M. Scott Ford <[email protected]>
1 parent 207dd44 commit 313ef44

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

features/json_format.feature

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Feature: Creating BOM using Json format
22

3-
Scenario: Running against simple fixture
3+
Scenario: Using default output path
44
Given I use a fixture named "simple"
55
And I run `cyclonedx-ruby --path . --format json`
66
Then the output should contain:
@@ -9,3 +9,13 @@ Feature: Creating BOM using Json format
99
"""
1010
And a file named "bom.json" should exist
1111
And the generated XML Json file "bom.json" matches "bom.json.expected"
12+
13+
Scenario: Specifying the output path
14+
Given I use a fixture named "simple"
15+
And I run `cyclonedx-ruby --path . --format json --output bom/simple.bom.json`
16+
Then the output should contain:
17+
"""
18+
5 gems were written to BOM located at bom/simple.bom.json
19+
"""
20+
And a file named "bom/simple.bom.json" should exist
21+
And the generated XML Json file "bom/simple.bom.json" matches "bom.json.expected"

features/xml_format.feature

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Feature: Creating BOM using XML format
22

3-
Scenario: Running against simple fixture
3+
Scenario: Using default output path
44
Given I use a fixture named "simple"
55
And I run `cyclonedx-ruby --path . --format xml`
66
Then the output should contain:
@@ -9,3 +9,13 @@ Feature: Creating BOM using XML format
99
"""
1010
And a file named "bom.xml" should exist
1111
And the generated XML BOM file "bom.xml" matches "bom.xml.expected"
12+
13+
Scenario: Specifying the output path
14+
Given I use a fixture named "simple"
15+
And I run `cyclonedx-ruby --path . --format xml --output bom/simple.bom.xml`
16+
Then the output should contain:
17+
"""
18+
5 gems were written to BOM located at bom/simple.bom.xml
19+
"""
20+
And a file named "bom/simple.bom.xml" should exist
21+
And the generated XML BOM file "bom/simple.bom.xml" matches "bom.xml.expected"

0 commit comments

Comments
 (0)