snapdragon 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3a7b0cc75a3e31b11e8b5e1ff8c9dedf268e281
4
- data.tar.gz: dd8fac388619a5529c7947f0bfcdf4f25ca972d9
3
+ metadata.gz: e9390e3dda99e7b5b4504f7b2ab6b8378a6af47c
4
+ data.tar.gz: 6d0791fc137d5b7abe928089059d821149855ef4
5
5
  SHA512:
6
- metadata.gz: 6c04bd17f44c3241ebf9f75e0306fd7afef3387f288655ef329b11e92e9af1a1abdf6d05658ee6929dd6923aa2b0d68a5a1844718c08e875d73802382671e318
7
- data.tar.gz: 2162787b797a49f53c8f1de29172c973c1c68710efc92b9b21d153fc1ea334ccbe4c175a6e0f109d8912e608d9e31d0dc194721e99c2fd90335152c763e5e8b2
6
+ metadata.gz: 722a22b9ce7b80b9681d1b373d2f562f007076d436120fb930a909a658cf8fecbda903799aa0363e2e0579f9fec329a4cc4373746cdb5589d24dbeed5a3af608
7
+ data.tar.gz: 35900ed38fc0923362b9b3fff2aab8fbb02149b8bf77ae394ffc5f15574dd8bbf12782c138de308c3de3e040d2dc3e2ce4f0d2b4ddbe2547111764f1f23fb7b4
data/ChangeLog.markdown CHANGED
@@ -6,6 +6,10 @@ versions as well as provide a rough history.
6
6
 
7
7
  #### Next Release
8
8
 
9
+ #### v0.1.11
10
+
11
+ * fixed issue where junit formatter was outputing multiple xml docs.
12
+
9
13
  #### v0.1.10
10
14
 
11
15
  * added --format junit switch to make it output JUnit format for CI servers
@@ -40,6 +40,11 @@
40
40
  };
41
41
 
42
42
  JUnitXmlReporter.prototype = {
43
+ reportRunnerStarting: function() {
44
+ this.print('<?xml version="1.0" encoding="UTF-8" ?>');
45
+ this.print("<testsuites>");
46
+ },
47
+
43
48
  reportSpecStarting: function(spec) {
44
49
  spec.startTime = new Date();
45
50
 
@@ -80,7 +85,6 @@
80
85
  reportSuiteResults: function(suite) {
81
86
  var results = suite.results();
82
87
  var specs = suite.specs();
83
- var specOutput = "";
84
88
  // for JUnit results, let's only include directly failed tests (not nested suites')
85
89
  var failedCount = 0;
86
90
 
@@ -96,31 +100,18 @@
96
100
 
97
101
  for (var i = 0; i < specs.length; i++) {
98
102
  failedCount += specs[i].didFail ? 1 : 0;
99
- specOutput += "\n " + specs[i].output;
100
103
  }
101
- suite.output = '\n<testsuite name="' + this.getFullName(suite) +
104
+ this.print('<testsuite name="' + this.getFullName(suite) +
102
105
  '" errors="0" tests="' + specs.length + '" failures="' + failedCount +
103
- '" time="' + suite.duration + '" timestamp="' + ISODateString(suite.startTime) + '">';
104
- suite.output += specOutput;
105
- suite.output += "\n</testsuite>";
106
+ '" time="' + suite.duration + '" timestamp="' + ISODateString(suite.startTime) + '">');
107
+ for (var i = 0; i < specs.length; i++) {
108
+ this.print(specs[i].output);
109
+ }
110
+ this.print("</testsuite>");
106
111
  },
107
112
 
108
113
  reportRunnerResults: function(runner) {
109
- var suites = runner.suites();
110
- for (var i = 0; i < suites.length; i++) {
111
- var suite = suites[i];
112
- var output = '<?xml version="1.0" encoding="UTF-8" ?>';
113
- // if we are consolidating, only write out top-level suites
114
- if (suite.parentSuite) {
115
- continue;
116
- }
117
- else {
118
- output += "\n<testsuites>";
119
- output += this.getNestedOutput(suite);
120
- output += "\n</testsuites>";
121
- this.print(output);
122
- }
123
- }
114
+ this.print("</testsuites>");
124
115
  this.signalCapybaraTestsFinishedRunning();
125
116
  },
126
117
 
@@ -130,14 +121,6 @@
130
121
  document.body.appendChild(div);
131
122
  },
132
123
 
133
- getNestedOutput: function(suite) {
134
- var output = suite.output;
135
- for (var i = 0; i < suite.suites().length; i++) {
136
- output += this.getNestedOutput(suite.suites()[i]);
137
- }
138
- return output;
139
- },
140
-
141
124
  getFullName: function(suite, isFilename) {
142
125
  var fullName;
143
126
  if (this.useDotNotation) {
@@ -158,6 +141,10 @@
158
141
  },
159
142
 
160
143
  print: function(str) {
144
+ this.log(str);
145
+ },
146
+
147
+ log: function(str) {
161
148
  var console = jasmine.getGlobal().console;
162
149
 
163
150
  if (console && console.log) {
@@ -1,3 +1,3 @@
1
1
  module Snapdragon
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapdragon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew De Ponte