diff --git a/spec/s3uploader_spec.rb b/spec/s3uploader_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/s3uploader_spec.rb
+++ b/spec/s3uploader_spec.rb
@@ -23,7 +23,7 @@ describe S3Uploader do
     (access + error).each do |file|
       directory, basename = File.split(File.join(tmp_directory, file))
       FileUtils.mkdir_p directory
-      Open3.popen3("dd if=/dev/zero of=#{directory}/#{basename} count=1024 bs=1024")
+      create_test_file(File.join(directory, basename), 1)
     end
   end
 
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,3 +8,11 @@ RSpec.configure do |config|
   config.color_enabled = true
   config.formatter = 'documentation'
 end
+
+
+def create_test_file(filename, size)
+  File.open(filename, 'w') do |f|
+    contents = "x" * (1024*1024)
+    size.to_i.times { f.write(contents) }
+  end
+end
Use Cross-platform creation of test files