Sha256: 2db05b0b7237d7a6cc64ca34c296f8d59891156aa754af54f9846422bb771305

Contents?: true

Size: 553 Bytes

Versions: 10

Compression:

Stored size: 553 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'
require File.dirname(__FILE__) + '/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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rspec-1.0.3 examples/io_processor_spec.rb
rspec-0.9.0 examples/io_processor_spec.rb
rspec-0.9.1 examples/io_processor_spec.rb
rspec-0.9.2 examples/io_processor_spec.rb
rspec-0.9.3 examples/io_processor_spec.rb
rspec-0.9.4 examples/io_processor_spec.rb
rspec-1.0.0 examples/io_processor_spec.rb
rspec-1.0.1 examples/io_processor_spec.rb
rspec-1.0.2 examples/io_processor_spec.rb
rspec-1.0.4 examples/io_processor_spec.rb