require 'spec_helper' describe FBO::Parser::AwardHandler do subject { FBO::Parser::UnknownHandler } let(:filename) { File.join(File.dirname(__FILE__), "..", "..", "fixtures", "notices", "snote") } let(:file) { File.new(filename) } let(:contents) { file.read } let(:unknown) { subject.parse(contents) } it "should return an Unknown notice" do unknown = subject.parse(contents) unknown.should be_instance_of(FBO::Notices::Unknown) end it "should parse out the type of the notice" do unknown.type.should eq "SNOTE" end it "should capture the complete content of the notice" do unknown.text.should eq contents end end