From f4fc48d13dc4b92e9abe035c595308217c0b6a52 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Mon, 24 Jun 2024 14:26:34 +0200 Subject: [PATCH] Hide output from CLI tests --- test/erb/test_formatter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/erb/test_formatter.rb b/test/erb/test_formatter.rb index 895d3f0..008f335 100644 --- a/test/erb/test_formatter.rb +++ b/test/erb/test_formatter.rb @@ -31,14 +31,14 @@ def test_error_on_unformattable_file def test_fail_level_flag_check_with_changes cli = ERB::Formatter::CommandLine.new(["--fail-level", "check", "test/fixtures/attributes.html.erb"]) error = assert_raises SystemExit do - cli.run + assert_output(/src="image.jpg"/) { cli.run } end assert_equal(1, error.status) end def test_fail_level_flag_check_without_changes cli = ERB::Formatter::CommandLine.new(["--fail-level", "check", "test/fixtures/attributes.html.expected.erb"]) - cli.run + assert_output(/src="image.jpg"/) { cli.run } end def test_format_text_with_extra_long_text