minitest-ci 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +7 -0
- data/lib/minitest/ci.rb +3 -3
- data/test/minitest/test_ci.rb +18 -2
- metadata +2 -2
    
        data/History.txt
    CHANGED
    
    
    
        data/lib/minitest/ci.rb
    CHANGED
    
    | @@ -4,7 +4,7 @@ require 'cgi' | |
| 4 4 | 
             
            module Minitest
         | 
| 5 5 | 
             
              class Ci
         | 
| 6 6 |  | 
| 7 | 
            -
                VERSION = '3.0. | 
| 7 | 
            +
                VERSION = '3.0.3'
         | 
| 8 8 |  | 
| 9 9 | 
             
                class << self
         | 
| 10 10 |  | 
| @@ -85,11 +85,11 @@ module Minitest | |
| 85 85 |  | 
| 86 86 | 
             
                  xml << '<?xml version="1.0" encoding="UTF-8"?>'
         | 
| 87 87 | 
             
                  xml << "<testsuite time='%6f' skipped='%d' failures='%d' errors='%d' name=%p assertions='%d' tests='%d'>" %
         | 
| 88 | 
            -
                    [total_time, skips, failures, errors, name | 
| 88 | 
            +
                    [total_time, skips, failures, errors, escape(name), assertions, results.count]
         | 
| 89 89 |  | 
| 90 90 | 
             
                  results.each do |result|
         | 
| 91 91 | 
             
                    xml << "  <testcase time='%6f' name=%p assertions='%s'>" %
         | 
| 92 | 
            -
                      [result.time, result.name, result.assertions]
         | 
| 92 | 
            +
                      [result.time, escape(result.name), result.assertions]
         | 
| 93 93 | 
             
                    if failure = result.failure
         | 
| 94 94 | 
             
                      label = failure.result_label.downcase
         | 
| 95 95 |  | 
    
        data/test/minitest/test_ci.rb
    CHANGED
    
    | @@ -35,12 +35,18 @@ class MockTestSuite < Minitest::Test | |
| 35 35 | 
             
              end
         | 
| 36 36 | 
             
            end
         | 
| 37 37 |  | 
| 38 | 
            -
             | 
| 38 | 
            +
            describe "spec/with::'punctuation'" do
         | 
| 39 39 | 
             
             it "passes" do
         | 
| 40 40 | 
             
               pass
         | 
| 41 41 | 
             
             end
         | 
| 42 42 | 
             
            end
         | 
| 43 43 |  | 
| 44 | 
            +
            describe "spec/with::\"doublequotes\"" do
         | 
| 45 | 
            +
             it 'will "pass"' do
         | 
| 46 | 
            +
               pass
         | 
| 47 | 
            +
             end
         | 
| 48 | 
            +
            end
         | 
| 49 | 
            +
             | 
| 44 50 | 
             
            # better way?
         | 
| 45 51 | 
             
            $ci_io = StringIO.new
         | 
| 46 52 | 
             
            Minitest::Ci.clean = false
         | 
| @@ -138,9 +144,19 @@ class TestMinitest::TestCi < Minitest::Test | |
| 138 144 | 
             
                refute_match( /lib\/minitest/, error.inner_text )
         | 
| 139 145 | 
             
              end
         | 
| 140 146 |  | 
| 141 | 
            -
              def  | 
| 147 | 
            +
              def test_suitename_with_single_quotes
         | 
| 142 148 | 
             
                file = File.read "test/reports/TEST-spec%2Fwith%3A%3A%27punctuation%27.xml"
         | 
| 143 149 | 
             
                suite = Nokogiri.parse(file).at_xpath('/testsuite')
         | 
| 144 150 | 
             
                assert_equal "spec/with::'punctuation'", suite['name']
         | 
| 145 151 | 
             
              end
         | 
| 152 | 
            +
             | 
| 153 | 
            +
              def test_suitename_with_double_quotes
         | 
| 154 | 
            +
                file = File.read "test/reports/TEST-spec%2Fwith%3A%3A%22doublequotes%22.xml"
         | 
| 155 | 
            +
                doc = Nokogiri.parse(file)
         | 
| 156 | 
            +
                suite = doc.at_xpath('/testsuite')
         | 
| 157 | 
            +
                testcase = doc.at_xpath('/testsuite/testcase')
         | 
| 158 | 
            +
             | 
| 159 | 
            +
                assert_equal 'spec/with::"doublequotes"', suite['name']
         | 
| 160 | 
            +
                assert_equal 'test_0001_will "pass"', testcase['name']
         | 
| 161 | 
            +
              end
         | 
| 146 162 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: minitest-ci
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.0. | 
| 4 | 
            +
              version: 3.0.3
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2013- | 
| 12 | 
            +
            date: 2013-10-09 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: minitest
         |