test/file_reader_test.rb in iostreams-0.8.1 vs test/file_reader_test.rb in iostreams-0.8.2
- old
+ new
@@ -1,24 +1,24 @@
require_relative 'test_helper'
# Unit Test for IOStreams::File
module Streams
class FileReaderTest < Minitest::Test
- context IOStreams::File::Reader do
- setup do
+ describe IOStreams::File::Reader do
+ before do
@file_name = File.join(File.dirname(__FILE__), 'files', 'text.txt')
@data = File.read(@file_name)
end
- context '.open' do
- should 'file' do
+ describe '.open' do
+ it 'file' do
result = IOStreams::File::Reader.open(@file_name) do |io|
io.read
end
assert_equal @data, result
end
- should 'stream' do
+ it 'stream' do
result = File.open(@file_name) do |file|
IOStreams::File::Reader.open(file) do |io|
io.read
end
end
@@ -26,6 +26,6 @@
end
end
end
end
-end
\ No newline at end of file
+end