Sha256: dafc3000840df225a8f164e819bb1c711c92a538f050b23df30174a9a83fd65a
Contents?: true
Size: 676 Bytes
Versions: 83
Compression:
Stored size: 676 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "IO#fsync" do it "raises IOError on closed stream" do lambda { IOSpecs.closed_file.fsync }.should raise_error(IOError) end it "writes the buffered data to permanent storage" do ret = "" File.open(tmp("fsync-specs"), "w") do |f| f.write "one hit wonder" lambda { ret = f.fsync }.should_not raise_error end # it returns nil on unsupported systems [0, nil].include?(ret).should == true File.unlink(tmp("fsync-specs")) end end
Version data entries
83 entries across 83 versions & 1 rubygems