1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

File.new('/dev/null') rescue File.new('nul')

This commit is contained in:
Viktar Basharymau 2011-03-15 21:07:44 +02:00
parent 423dd39f36
commit 5e4e929e0e
2 changed files with 2 additions and 2 deletions

View file

@ -504,7 +504,7 @@ EOS
it "inherited from File should be displayed as File" do it "inherited from File should be displayed as File" do
class My < File; end class My < File; end
my = File.new('nul') my = File.new('/dev/null') rescue File.new('nul')
my.ai(:plain => true).should == "#{my.inspect}\n" << `ls -alF #{my.path}`.chop my.ai(:plain => true).should == "#{my.inspect}\n" << `ls -alF #{my.path}`.chop
end end

View file

@ -6,7 +6,7 @@ require 'ap/core_ext/logger'
describe "AwesomePrint logging extensions" do describe "AwesomePrint logging extensions" do
before(:all) do before(:all) do
@logger = Logger.new('nul') @logger = Logger.new('/dev/null') #rescue Logger.new('nul')
end end
describe "ap method" do describe "ap method" do