public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10
describe "Processing XML file" do
it "opens the file correctly" do
file_path = "/some/path/to.xml"
xml = "<xml>bleh</xml>"
stub_file = stub(:read).and_return(xml)
File.stub(:open).and_return(stub_file)
Parse.should_receive(:process_xml).with(xml)
Parser.process(file_path)
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.