mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-02 09:31:37 +08:00
17 lines
243 B
Ruby
17 lines
243 B
Ruby
require 'test/unit'
|
|
require_relative 'ut_eof'
|
|
|
|
class TestPipe < Test::Unit::TestCase
|
|
include TestEOF
|
|
def open_file(content)
|
|
r, w = IO.pipe
|
|
w << content
|
|
w.close
|
|
begin
|
|
yield r
|
|
ensure
|
|
r.close
|
|
end
|
|
end
|
|
end
|