Sha256: 072b880fc6afa3aafd81b00879844094dce1fdeed421a550deb365bdbd57d4e4
Contents?: true
Size: 762 Bytes
Versions: 1
Compression:
Stored size: 762 Bytes
Contents
require_relative 'test_helper' # Unit Test for IOStreams::File module Streams class FileReaderTest < Minitest::Test describe IOStreams::File::Reader do before do @file_name = File.join(File.dirname(__FILE__), 'files', 'text.txt') @data = File.read(@file_name) end describe '.open' do it 'file' do result = IOStreams::File::Reader.open(@file_name) do |io| io.read end assert_equal @data, result end it 'stream' do result = File.open(@file_name) do |file| IOStreams::File::Reader.open(file) do |io| io.read end end assert_equal @data, result end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iostreams-0.8.2 | test/file_reader_test.rb |