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:
parent
423dd39f36
commit
5e4e929e0e
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue