| 1 |
Feature: output file for metrics tool |
| 2 |
|
| 3 |
Scenario: passing output file in the command line |
| 4 |
Given I am in . |
| 5 |
When I run "analizo metrics --output output.yml.tmp t/samples/sample_basic/" |
| 6 |
Then the contents of "output.yml.tmp" must match "module2" |
| 7 |
And the exit status must be 0 |
| 8 |
|
| 9 |
Scenario: passing output file without permission to write |
| 10 |
Given I am in . |
| 11 |
When I run "touch output.tmp" |
| 12 |
And I run "chmod 000 output.tmp" |
| 13 |
And I run "analizo metrics --output output.tmp t/samples/sample_basic/" |
| 14 |
Then the exit status must not be 0 |
| 15 |
And analizo must emit a warning matching "Permission denied" |
| 16 |
|
| 17 |
Scenario: passing output file in an unexisting directory |
| 18 |
Given I am in . |
| 19 |
When I run "analizo metrics --output /this/directory/must/not/exists/output.yml t/samples" |
| 20 |
Then the exit status must not be 0 |
| 21 |
And analizo must emit a warning matching "No such file or directory" |