We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b11f95 commit c34f877Copy full SHA for c34f877
spec/controllers/service_spec.rb
@@ -3,7 +3,7 @@
3
4
describe Service do
5
before(:all) do
6
- silence_stream(STDERR) do
+ silence_warnings do
7
Service::INITD_PATH = 'tmp/sandbox' + Service::INITD_PATH
8
Service::DEFAULT_CONFIG_PATH = 'tmp/sandbox' + Service::DEFAULT_CONFIG_PATH
9
end
spec/spec_helper.rb
@@ -135,6 +135,13 @@ def silence_stream(stream)
135
stream.reopen(old_stream)
136
137
138
+ def silence_warnings
139
+ old_verbose, $VERBOSE = $VERBOSE, nil
140
+ yield
141
+ ensure
142
+ $VERBOSE = old_verbose
143
+ end
144
+
145
# Create and parse a request
146
def R(raw, convert_line_feed=false)
147
raw.gsub!("\n", "\r\n") if convert_line_feed
0 commit comments