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