test/test_xunit_publisher.rb in rubyjobbuilderdsl-0.0.5 vs test/test_xunit_publisher.rb in rubyjobbuilderdsl-0.0.6

- old
+ new

@@ -1,22 +1,22 @@ -require_relative './test_xml_generator' - -class TestXmlXUnitPublisher < Test::Unit::TestCase - def test_postbuild_xunit_publisher - builder = JenkinsJob::Builder.new - - builder.freestyle 'foo' do - postbuild do - publish_xunit_report 'a\\b' do - failed_threshold :total_failed_tests => 0 - unstable_threshold :total_skipped_tests => 0 - end - end - end - - actual = builder.config_as_xml_node('foo') - - assert 'a\\b', actual.xpath('./project/publishers/xunit/types/NUnitJunitHudsonTestType/pattern').text - assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.FailedThreshold/failureThreshold').text - assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.SkippedThreshold/unstableThreshold').text - end -end +require_relative './test_xml_generator' + +class TestXmlXUnitPublisher < Test::Unit::TestCase + def test_postbuild_xunit_publisher + builder = JenkinsJob::Builder.new + + builder.freestyle 'foo' do + postbuild do + publish_xunit_report 'a\\b' do + failed_threshold :total_failed_tests => 0 + unstable_threshold :total_skipped_tests => 0 + end + end + end + + actual = builder.config_as_xml_node('foo') + + assert 'a\\b', actual.xpath('./project/publishers/xunit/types/NUnitJunitHudsonTestType/pattern').text + assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.FailedThreshold/failureThreshold').text + assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.SkippedThreshold/unstableThreshold').text + end +end