Skip to content

Instantly share code, notes, and snippets.

@hasham2
Created January 19, 2010 10:42
Show Gist options
  • Select an option

  • Save hasham2/280837 to your computer and use it in GitHub Desktop.

Select an option

Save hasham2/280837 to your computer and use it in GitHub Desktop.
# Add more helper methods to be used by all tests here...
def load_xml_fixture_file(name)
path = RAILS_ROOT + "/test/fixtures/#{name}.xml"
if File.exists?(path)
contents = ""
File.open(path).each do |line|
contents << line
end
return contents
else
return nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment