1
require File.dirname(__FILE__) + '/spec_helper'
2
require File.dirname(__FILE__) + '/io_processor'
5
describe "An IoProcessor" do
7
@processor = IoProcessor.new
10
it "should raise nothing when the file is exactly 32 bytes" do
12
@processor.process(StringIO.new("z"*32))
13
}.should_not raise_error
16
it "should raise an exception when the file length is less than 32 bytes" do
18
@processor.process(StringIO.new("z"*31))
19
}.should raise_error(DataTooShort)