konacha 1.5.0 → 1.5.1
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.md +7 -1
- data/konacha.gemspec +1 -1
- data/lib/konacha/runner.rb +8 -4
- data/vendor/assets/javascripts/mocha.js +10 -9
- metadata +4 -4
data/History.md
CHANGED
data/konacha.gemspec
CHANGED
@@ -17,7 +17,7 @@ the asset pipeline and engines.}
|
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
gem.name = "konacha"
|
19
19
|
gem.require_paths = ["lib"]
|
20
|
-
gem.version = "1.5.
|
20
|
+
gem.version = "1.5.1"
|
21
21
|
|
22
22
|
gem.add_dependency "railties", "~> 3.1"
|
23
23
|
gem.add_dependency "actionpack", "~> 3.1"
|
data/lib/konacha/runner.rb
CHANGED
@@ -40,7 +40,7 @@ module Konacha
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def passed?
|
43
|
-
examples.all? { |example| example.passed? }
|
43
|
+
examples.all? { |example| example.passed? || example.pending? }
|
44
44
|
end
|
45
45
|
|
46
46
|
def failure_messages
|
@@ -102,9 +102,7 @@ module Konacha
|
|
102
102
|
Example.new(row)
|
103
103
|
end
|
104
104
|
rescue => e
|
105
|
-
|
106
|
-
msg << e.message unless e.message.blank?
|
107
|
-
raise Konacha::Error, "Error communicating with browser process:\n#{msg.join("\n")}"
|
105
|
+
raise e, "Error communicating with browser process: #{e}", e.backtrace
|
108
106
|
end
|
109
107
|
end
|
110
108
|
|
@@ -139,5 +137,11 @@ module Konacha
|
|
139
137
|
end
|
140
138
|
|
141
139
|
class Error < StandardError
|
140
|
+
attr_accessor :original
|
141
|
+
|
142
|
+
def initialize(msg, original=nil);
|
143
|
+
super(msg);
|
144
|
+
@original = original;
|
145
|
+
end
|
142
146
|
end
|
143
147
|
end
|
@@ -940,7 +940,8 @@ require.register("mocha.js", function(module, exports, require){
|
|
940
940
|
* Module dependencies.
|
941
941
|
*/
|
942
942
|
|
943
|
-
var path = require('browser/path')
|
943
|
+
var path = require('browser/path')
|
944
|
+
, utils = require('./utils');
|
944
945
|
|
945
946
|
/**
|
946
947
|
* Expose `Mocha`.
|
@@ -952,7 +953,7 @@ exports = module.exports = Mocha;
|
|
952
953
|
* Expose internals.
|
953
954
|
*/
|
954
955
|
|
955
|
-
exports.utils =
|
956
|
+
exports.utils = utils;
|
956
957
|
exports.interfaces = require('./interfaces');
|
957
958
|
exports.reporters = require('./reporters');
|
958
959
|
exports.Runnable = require('./runnable');
|
@@ -1086,16 +1087,16 @@ Mocha.prototype._growl = function(runner, reporter) {
|
|
1086
1087
|
};
|
1087
1088
|
|
1088
1089
|
/**
|
1089
|
-
* Add regexp to grep
|
1090
|
+
* Add regexp to grep, if `re` is a string it is escaped.
|
1090
1091
|
*
|
1091
|
-
* @param {RegExp
|
1092
|
+
* @param {RegExp|String} re
|
1092
1093
|
* @return {Mocha}
|
1093
1094
|
* @api public
|
1094
1095
|
*/
|
1095
1096
|
|
1096
1097
|
Mocha.prototype.grep = function(re){
|
1097
1098
|
this.options.grep = 'string' == typeof re
|
1098
|
-
? new RegExp(re)
|
1099
|
+
? new RegExp(utils.escapeRegexp(re))
|
1099
1100
|
: re;
|
1100
1101
|
return this;
|
1101
1102
|
};
|
@@ -1758,12 +1759,13 @@ var statsTemplate = '<ul id="stats">'
|
|
1758
1759
|
* @api public
|
1759
1760
|
*/
|
1760
1761
|
|
1761
|
-
function HTML(runner
|
1762
|
+
function HTML(runner) {
|
1762
1763
|
Base.call(this, runner);
|
1763
1764
|
|
1764
1765
|
var self = this
|
1765
1766
|
, stats = this.stats
|
1766
1767
|
, total = runner.total
|
1768
|
+
, root = document.getElementById('mocha')
|
1767
1769
|
, stat = fragment(statsTemplate)
|
1768
1770
|
, items = stat.getElementsByTagName('li')
|
1769
1771
|
, passes = items[1].getElementsByTagName('em')[0]
|
@@ -1777,8 +1779,6 @@ function HTML(runner, root) {
|
|
1777
1779
|
, progress
|
1778
1780
|
, ctx
|
1779
1781
|
|
1780
|
-
root = root || document.getElementById('mocha');
|
1781
|
-
|
1782
1782
|
if (canvas.getContext) {
|
1783
1783
|
var ratio = window.devicePixelRatio || 1;
|
1784
1784
|
canvas.style.width = canvas.width;
|
@@ -1814,7 +1814,7 @@ function HTML(runner, root) {
|
|
1814
1814
|
|
1815
1815
|
// suite
|
1816
1816
|
var grep = '^' + encodeURIComponent(utils.escapeRegexp(suite.fullTitle()));
|
1817
|
-
var url = '?grep=' + grep;
|
1817
|
+
var url = location.protocol + '//' + location.host + location.pathname + '?grep=' + grep;
|
1818
1818
|
var el = fragment('<li class="suite"><h1><a href="%s">%s</a></h1></li>', url, escape(suite.title));
|
1819
1819
|
|
1820
1820
|
// container
|
@@ -1957,6 +1957,7 @@ exports.Min = require('./min');
|
|
1957
1957
|
exports.Spec = require('./spec');
|
1958
1958
|
exports.Nyan = require('./nyan');
|
1959
1959
|
exports.XUnit = require('./xunit');
|
1960
|
+
exports.Markdown = require('./markdown');
|
1960
1961
|
exports.Progress = require('./progress');
|
1961
1962
|
exports.Landing = require('./landing');
|
1962
1963
|
exports.JSONCov = require('./json-cov');
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konacha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 1
|
10
|
+
version: 1.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Firebaugh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-09-04 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: railties
|