Sha256: e5c3c639da4b1b00795011167b9b081050f9dc7e84c0c6f0706c645dbfe0413b

Contents?: true

Size: 554 Bytes

Versions: 120

Compression:

Stored size: 554 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

120 entries across 120 versions & 14 rubygems

Version Path
dchelimsky-rspec-1.1.10 examples/pure/io_processor_spec.rb
dchelimsky-rspec-1.1.11.1 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.2 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.3 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.4 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.5 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.6 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11.7 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.11 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.12 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.1 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.13 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.2 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.3 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.4 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.5 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.6 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.7 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.8 examples/passing/io_processor_spec.rb
dchelimsky-rspec-1.1.99.9 examples/passing/io_processor_spec.rb