Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use dev_null() helper.

  • Loading branch information...
commit 972f054261ed611c132e698f8ee34ba282a6dffb 1 parent 301f18c
Brian Shirai brixen authored
Showing with 3 additions and 15 deletions.
  1. +1 −5 command_line/dash_d_spec.rb
  2. +2 −10 command_line/error_message_spec.rb
6 command_line/dash_d_spec.rb
View
@@ -6,10 +6,6 @@
end
it "sets $DEBUG to true" do
- if PlatformGuard.windows?
- ruby_exe(@script, :options => "-d").chomp.should == "true"
- else
- ruby_exe(@script, :options => "-d", :args => "2>/dev/null").chomp.should == "true"
- end
+ ruby_exe(@script, :options => "-d", :args => "2> #{dev_null()}").chomp.should == "true"
end
end
12 command_line/error_message_spec.rb
View
@@ -1,19 +1,11 @@
require File.expand_path('../../spec_helper', __FILE__)
describe "The error message caused by an exception" do
-
- before :all do
- @devnull = "/dev/null"
- platform_is :windows do
- @devnull = "NUL"
- end
- end
-
it "is not printed to stdout" do
- out = ruby_exe("this_does_not_exist", :args => "2> #{@devnull}")
+ out = ruby_exe("this_does_not_exist", :args => "2> #{dev_null()}")
out.chomp.empty?.should == true
- out = ruby_exe("end #syntax error", :args => "2> #{@devnull}")
+ out = ruby_exe("end #syntax error", :args => "2> #{dev_null()}")
out.chomp.empty?.should == true
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.