Skip to content

Instantly share code, notes, and snippets.

@MikeBild
Created June 18, 2011 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeBild/1033371 to your computer and use it in GitHub Desktop.
Save MikeBild/1033371 to your computer and use it in GitHub Desktop.
Transform MSpec to JUnit
require "nokogiri"
class TransformMSpecReport
def self.transform()
doc = Nokogiri::XML(File.read('test_result.xml'))
xslt = Nokogiri::XSLT(File.read('mSpec2JUnit.xslt'))
doc = xslt.transform(doc)
File.open('test_result_junit.xml', 'w') {|f| f.write(doc) }
puts "File transformed."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment