Sha256: 0064c2a4678d6f497238f4f976c837f4782e452f333e9b630f77dd3171c1c5a1

Contents?: true

Size: 433 Bytes

Versions: 4

Compression:

Stored size: 433 Bytes

Contents

require 'spec_helper'

describe CachedResource::NilIO do
  before(:all) do
    @null_device = CachedResource::NilIO.new
  end

  it "should discard any data written" do
    @null_device.write("I am writing something")
    @null_device.readlines.should be_blank
  end

  it "should provide no data when read" do
    @null_device.read(200).should == nil
  end

  it "should report EOF" do
    @null_device.eof?.should == true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cached_resource-2.1.3 spec/cached_resource/nilio_spec.rb
cached_resource-2.1.2 spec/cached_resource/nilio_spec.rb
cached_resource-2.1.1a spec/cached_resource/nilio_spec.rb
cached_resource-2.0.1 spec/cached_resource/nilio_spec.rb