Sha256: e758069871fbc4f1ab4467d027c3d30e16131cf7856ceace66dd34ae6c3e4e9f
Contents?: true
Size: 634 Bytes
Versions: 52
Compression:
Stored size: 634 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/classes', __FILE__) describe "IO#printf" do before :each do @name = tmp("io_printf.txt") @io = new_io @name @io.sync = true end after :each do @io.close unless @io.closed? rm_r @name end it "writes the #sprintf formatted string" do @io.printf "%d %s", 5, "cookies" @name.should have_data("5 cookies") end if System.get_property('platform') != 'ANDROID' it "raises IOError on closed stream" do lambda { IOSpecs.closed_io.printf("stuff") }.should raise_error(IOError) end end end
Version data entries
52 entries across 52 versions & 2 rubygems