diff --git a/test/unprivileged/readme_examples_test.rb b/test/unprivileged/readme_examples_test.rb index 1c09aa6..58e0e9e 100644 --- a/test/unprivileged/readme_examples_test.rb +++ b/test/unprivileged/readme_examples_test.rb @@ -12,9 +12,9 @@ module BSD::Control end def test_available_features_stdout - cmd("ruby", readme_example("1_available_features.rb")) - .stdout - .each_line { assert_match %r{The [a-zA-Z0-9_]+ feature is available}, _1 } + assert_match %r|\A(The [a-zA-Z0-9_]+ feature is available\n){9}\z|, + cmd("ruby", readme_example("1_available_features.rb")).stdout + end private