diff --git a/spec/support/filesystem_helpers.rb b/spec/support/filesystem_helpers.rb new file mode 100644 index 0000000..8aa32d0 --- /dev/null +++ b/spec/support/filesystem_helpers.rb @@ -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