Created
June 18, 2011 18:21
-
-
Save MikeBild/1033371 to your computer and use it in GitHub Desktop.
Transform MSpec to JUnit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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