Add rspec helpers for filesystem
This commit is contained in:
parent
e9de59b37b
commit
d6ae5d9446
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
|
Loading…
x
Reference in New Issue
Block a user