Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.497 kb
require 'examples/passing/io_processor'
require 'stringio'
describe "An IoProcessor" do
before(:each) do
@processor = IoProcessor.new
end
it "should raise nothing when the file is exactly 32 bytes" do
lambda {
@processor.process(StringIO.new("z"*32))
}.should_not raise_error
end
it "should raise an exception when the file length is less than 32 bytes" do
lambda {
@processor.process(StringIO.new("z"*31))
}.should raise_error(DataTooShort)
end
end
Jump to Line
Something went wrong with that request. Please try again.