Sha256: d2eaa439058868da5bd4f0fdf631d3b538f8678aadb89d2409d4bfa6a762fa5a

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

#!/usr/local/bin/ruby
if $0 == __FILE__
  Dir.chdir File.dirname(__FILE__)+'/../'
  $:.unshift File.expand_path('../lib/')
end

require 'rio'
require 'test/unit'
require 'test/unit/testsuite'
require 'extensions/symbol'
require 'tc/testcase'
require 'tmpdir'

class TC_tempfile < Test::RIO::TestCase
  @@once = false
  def self.once
    @@once = true
  end
  def setup
    super
    self.class.once unless @@once
    @tmpdir = ::Dir::tmpdir
    @pfx = 'rio'
  end

  def pathinfo(ario)
    [:scheme,:opaque,:path,:fspath,:to_s,:to_url,:to_uri].each do |sym|
      puts "#{sym}: #{ario.__send__(sym)}"
    end
  end

  def test_io
    str = "Hello Tempfile"
    assert_equal(str,rio(??).puts(str).rewind.chomp.gets)
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rio-0.3.2 test/tc/tempfile.rb