Skip to content

Commit

Permalink
Bit more spec coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacksmoke16 committed Dec 15, 2024
1 parent 5c6aa27 commit 889f4a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/console/spec/application_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,15 @@ struct ApplicationTest < ASPEC::TestCase
ENV["COLUMNS"] = "120"
tester = ACON::Spec::ApplicationTester.new app

tester.run command: "foo", decorated: false, capture_stderr_separately: true
tester.run command: "foo", decorated: false, verbosity: :quiet, capture_stderr_separately: true
self.assert_file_equals_string "text/application_renderexception1.txt", tester.error_output true

tester.run command: "foo", decorated: false, capture_stderr_separately: true, verbosity: :verbose
tester.run command: "foo", decorated: false, verbosity: :verbose, capture_stderr_separately: true
tester.error_output.should contain "Exception trace"

tester.run command: "foo", decorated: false, verbosity: :silent, capture_stderr_separately: true
tester.error_output(true).should be_empty

tester.run command: "list", "--foo": true, decorated: false, capture_stderr_separately: true
self.assert_file_equals_string "text/application_renderexception2.txt", tester.error_output true

Expand Down
1 change: 1 addition & 0 deletions src/components/console/spec/output/output_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct OutputTest < ASPEC::TestCase

def verbosity_provider : Tuple
{
{ACON::Output::Verbosity::SILENT, ""},
{ACON::Output::Verbosity::QUIET, "2"},
{ACON::Output::Verbosity::NORMAL, "123"},
{ACON::Output::Verbosity::VERBOSE, "1234"},
Expand Down

0 comments on commit 889f4a6

Please sign in to comment.