summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_mime_types_cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_mime_types_cache.rb b/test/test_mime_types_cache.rb
index 909f18c..48a8bb3 100644
--- a/test/test_mime_types_cache.rb
+++ b/test/test_mime_types_cache.rb
@@ -67,7 +67,7 @@ describe MIME::Types::Cache do
it "outputs an error when there is a marshal file incompatibility" do
MIME::Types::Cache.save
data = File.binread(@cache_file).reverse
- File.open(@cache_file, "wb") { |f| f.write(data) }
+ File.binwrite(@cache_file, data)
MIME::Types.instance_variable_set(:@__types__, nil)
assert_output "", /incompatible marshal file format/ do
MIME::Types["text/html"]