Add rspec helpers for filesystem
This commit is contained in:
11
spec/support/filesystem_helpers.rb
Normal file
11
spec/support/filesystem_helpers.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
require 'tempfile'
|
||||
|
||||
module FileSystemHelpers
|
||||
def with_file content
|
||||
Tempfile.create('uhwm_rspec') do |f|
|
||||
f.write content
|
||||
f.rewind
|
||||
yield f
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user