@@ -78,9 +78,12 @@ def test_shebang_when_is_the_same_as_default_use_env
78
78
end
79
79
80
80
def test_template_raises_an_error_with_invalid_path
81
- content = capture ( :stderr ) { run_generator ( [ destination_root , "-m" , "non/existent/path" ] ) }
82
- assert_match ( /The template \[ .*\] could not be loaded/ , content )
83
- assert_match ( /non\/ existent\/ path/ , content )
81
+ quietly do
82
+ content = capture ( :stderr ) { run_generator ( [ destination_root , "-m" , "non/existent/path" ] ) }
83
+
84
+ assert_match ( /The template \[ .*\] could not be loaded/ , content )
85
+ assert_match ( /non\/ existent\/ path/ , content )
86
+ end
84
87
end
85
88
86
89
def test_template_is_executed_when_supplied
@@ -89,7 +92,7 @@ def test_template_is_executed_when_supplied
89
92
template . instance_eval "def read; self; end" # Make the string respond to read
90
93
91
94
generator ( [ destination_root ] , template : path ) . expects ( :open ) . with ( path , 'Accept' => 'application/x-thor-template' ) . returns ( template )
92
- assert_match ( /It works!/ , capture ( :stdout ) { generator . invoke_all } )
95
+ quietly { assert_match ( /It works!/ , capture ( :stdout ) { generator . invoke_all } ) }
93
96
end
94
97
95
98
def test_template_is_executed_when_supplied_an_https_path
@@ -98,7 +101,7 @@ def test_template_is_executed_when_supplied_an_https_path
98
101
template . instance_eval "def read; self; end" # Make the string respond to read
99
102
100
103
generator ( [ destination_root ] , template : path ) . expects ( :open ) . with ( path , 'Accept' => 'application/x-thor-template' ) . returns ( template )
101
- assert_match ( /It works!/ , capture ( :stdout ) { generator . invoke_all } )
104
+ quietly { assert_match ( /It works!/ , capture ( :stdout ) { generator . invoke_all } ) }
102
105
end
103
106
104
107
def test_dev_option
0 commit comments