Skip to content

Commit 2db0097

Browse files
committed
Use File::NULL instead of hardcoded /dev/null
Allow to run specs in file systems where `/dev/null` is not supported, like Windows. Tested on GitHub Actions, with `runs-on: windows-latest`
1 parent 01b5e60 commit 2db0097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/io_resource_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
let(:file_path) { File.expand_path('files/example.svg', __dir__) }
7070
let(:answer) { File.read(file_path) }
7171
let(:rio) { File.new(file_path, 'r') }
72-
let(:wio) { File.new('/dev/null', 'w') }
72+
let(:wio) { File.new(File::NULL, 'w') }
7373

7474
instance_exec(&tests)
7575
it 'has non empty body' do

0 commit comments

Comments
 (0)