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
rspec-core-2.0.0.a10 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a9 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a8 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a7 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a6 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a5 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a4 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a3 example_specs/passing/io_processor_spec.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/io_processor_spec.rb
rspec-core-2.0.0.a2 example_specs/passing/io_processor_spec.rb
rspec-core-2.0.0.a1 example_specs/passing/io_processor_spec.rb
rspec-1.2.7 examples/passing/io_processor_spec.rb
rspec-1.2.8 examples/passing/io_processor_spec.rb
deckshuffler-0.0.2 vendor/plugins/rspec/examples/io_processor_spec.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/examples/io_processor_spec.rb
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/examples/io_processor_spec.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/examples/io_processor_spec.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/examples/pure/io_processor_spec.rb
picolena-0.1.1 rails_plugins/rspec/examples/pure/io_processor_spec.rb
picolena-0.1.0 rails_plugins/rspec/examples/pure/io_processor_spec.rb