diff --git a/spec/ethon/easy/http/put_spec.rb b/spec/ethon/easy/http/put_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/ethon/easy/http/put_spec.rb
+++ b/spec/ethon/easy/http/put_spec.rb
@@ -103,7 +103,7 @@ describe Ethon::Easy::Http::Put do
           let(:easy) do
             e = Ethon::Easy.new(:url => url, :upload => true)
             e.set_read_callback(file)
-            e.infilesize = file.size
+            e.infilesize = File.size(file.path)
             e
           end
Fix again <I> file api issues.