Sha256: b537fc24c5350a51c45a5d4e550a17b6a2e6f16ee96744fd55a273aa6df819b1

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'

describe FBO::File do
  context "existing file" do
    let(:filename)   { File.join(File.dirname(__FILE__), "..", "fixtures", "FBOFeed20130331") }
    subject          { FBO::File.new(filename) }

    it "should be possible to open the file and read its contents" do
      subject.readline.should_not be_nil
    end
  end

  context "non-existent file" do
    subject          { FBO::File.new("foobar.bat") }

    it "should raise an exception when trying open the file and read its contents" do
      expect { subject.readline }.to raise_error
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fbo-0.0.3 spec/fbo/file_spec.rb
fbo-0.0.2 spec/fbo/file_spec.rb
fbo-0.0.1 spec/fbo/file_spec.rb