Skip to content

Instantly share code, notes, and snippets.

@CoryFoy
Created April 12, 2012 17:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save CoryFoy/2369535 to your computer and use it in GitHub Desktop.
Save CoryFoy/2369535 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment