jasmine_webos 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -3
- data/lib/jasminewebos.rb +1 -1
- data/vendor/jasmine/contrib/ruby/jasmine_runner.rb +8 -5
- data/vendor/jasmine/contrib/ruby/run.html +2 -3
- data/vendor/jasmine/lib/TrivialReporter.js +18 -7
- data/vendor/jasmine/lib/jasmine-0.9.0.js +116 -64
- data/vendor/jasmine/lib/jasmine.css +13 -29
- metadata +7 -10
data/README.rdoc
CHANGED
@@ -9,8 +9,8 @@ Runs a server to view your tests against.
|
|
9
9
|
|
10
10
|
== INSTALL:
|
11
11
|
|
12
|
-
sudo gem source -a http://
|
13
|
-
sudo gem install
|
12
|
+
sudo gem source -a http://gemcutter.org
|
13
|
+
sudo gem install jasmine_webos
|
14
14
|
|
15
15
|
== LICENSE:
|
16
16
|
|
@@ -35,4 +35,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
35
35
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
36
36
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
37
37
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
38
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
38
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/jasminewebos.rb
CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
4
|
module Jasminewebos
|
5
|
-
VERSION = '0.0.
|
5
|
+
VERSION = '0.0.8'
|
6
6
|
|
7
7
|
# def configure(&block)
|
8
8
|
# @@configuration = Jasminewebos::Configuration.new
|
@@ -61,13 +61,14 @@ module Jasmine
|
|
61
61
|
end
|
62
62
|
|
63
63
|
class RunAdapter
|
64
|
-
def initialize(spec_files_or_proc, jasmine_files = nil)
|
64
|
+
def initialize(spec_files_or_proc, jasmine_files = nil, stylesheets = [])
|
65
65
|
@spec_files_or_proc = spec_files_or_proc
|
66
66
|
@jasmine_files = jasmine_files || [
|
67
67
|
"/__JASMINE_ROOT__/lib/" + File.basename(Dir.glob("#{Jasmine.root}/lib/jasmine*.js").first),
|
68
68
|
"/__JASMINE_ROOT__/lib/TrivialReporter.js",
|
69
69
|
"/__JASMINE_ROOT__/lib/json2.js"
|
70
70
|
]
|
71
|
+
@stylesheets = ["/__JASMINE_ROOT__/lib/jasmine.css"] + stylesheets
|
71
72
|
end
|
72
73
|
|
73
74
|
def call(env)
|
@@ -77,7 +78,7 @@ module Jasmine
|
|
77
78
|
jasmine_files = @jasmine_files
|
78
79
|
jasmine_files = jasmine_files.call if jasmine_files.respond_to?(:call)
|
79
80
|
|
80
|
-
css_files =
|
81
|
+
css_files = @stylesheets
|
81
82
|
|
82
83
|
body = ERB.new(File.read(File.join(File.dirname(__FILE__), "run.html"))).result(binding)
|
83
84
|
[
|
@@ -113,12 +114,12 @@ module Jasmine
|
|
113
114
|
end
|
114
115
|
|
115
116
|
class SimpleServer
|
116
|
-
def self.start(port, spec_files_or_proc, mappings, jasmine_files = nil)
|
117
|
+
def self.start(port, spec_files_or_proc, mappings, jasmine_files = nil, stylesheets = [])
|
117
118
|
require 'thin'
|
118
119
|
|
119
120
|
config = {
|
120
121
|
'/run.html' => Jasmine::Redirect.new('/'),
|
121
|
-
'/' => Jasmine::RunAdapter.new(spec_files_or_proc, jasmine_files)
|
122
|
+
'/' => Jasmine::RunAdapter.new(spec_files_or_proc, jasmine_files, stylesheets)
|
122
123
|
}
|
123
124
|
mappings.each do |from, to|
|
124
125
|
config[from] = Rack::File.new(to)
|
@@ -185,6 +186,8 @@ module Jasmine
|
|
185
186
|
@dir_mappings = dir_mappings
|
186
187
|
@jasmine_files = jasmine_files
|
187
188
|
@browser = options[:browser] || 'firefox'
|
189
|
+
@stylesheets = options[:stylesheets] || []
|
190
|
+
|
188
191
|
|
189
192
|
@selenium_pid = nil
|
190
193
|
@jasmine_server_pid = nil
|
@@ -213,7 +216,7 @@ module Jasmine
|
|
213
216
|
|
214
217
|
@jasmine_server_pid = fork do
|
215
218
|
Process.setpgrp
|
216
|
-
Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files)
|
219
|
+
Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files, @stylesheets)
|
217
220
|
exit! 0
|
218
221
|
end
|
219
222
|
puts "jasmine server started. pid is #{@jasmine_server_pid}"
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
|
5
5
|
<title>Jasmine suite</title>
|
6
6
|
<% css_files.each do |css_file| %>
|
7
|
-
<link rel="stylesheet" href="<%= css_file %>" type="text/css" media="screen"
|
7
|
+
<link rel="stylesheet" href="<%= css_file %>" type="text/css" media="screen"/>
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% jasmine_files.each do |jasmine_file| %>
|
@@ -15,8 +15,7 @@
|
|
15
15
|
var jsApiReporter;
|
16
16
|
(function() {
|
17
17
|
var jasmineEnv = jasmine.getEnv();
|
18
|
-
|
19
|
-
|
18
|
+
|
20
19
|
jsApiReporter = new jasmine.JsApiReporter();
|
21
20
|
var trivialReporter = new jasmine.TrivialReporter();
|
22
21
|
|
@@ -19,6 +19,8 @@ jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarA
|
|
19
19
|
for (var attr in attrs) {
|
20
20
|
if (attr == 'className') {
|
21
21
|
el.setAttribute('class', attrs[attr]);
|
22
|
+
//twice for ie
|
23
|
+
el.setAttribute('className', attrs[attr]);
|
22
24
|
} else {
|
23
25
|
el[attr] = attrs[attr];
|
24
26
|
}
|
@@ -31,15 +33,15 @@ jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
|
31
33
|
var suites = runner.suites();
|
32
34
|
|
33
35
|
this.runnerDiv = this.createDom('div', { className: 'runner running' },
|
34
|
-
this.createDom('a', { className: '
|
36
|
+
this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
|
35
37
|
this.runnerMessageSpan = this.createDom('span', {}, "Running..."));
|
36
38
|
this.document.body.appendChild(this.runnerDiv);
|
37
39
|
|
38
40
|
for (var i = 0; i < suites.length; i++) {
|
39
41
|
var suite = suites[i];
|
40
42
|
var suiteDiv = this.createDom('div', { className: 'suite' },
|
41
|
-
this.createDom('a', { className: '
|
42
|
-
suite.description);
|
43
|
+
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
|
44
|
+
this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
|
43
45
|
this.suiteDivs[suite.getFullName()] = suiteDiv;
|
44
46
|
var parentDiv = this.document.body;
|
45
47
|
if (suite.parentSuite) {
|
@@ -55,9 +57,18 @@ jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
|
55
57
|
var results = runner.results();
|
56
58
|
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
57
59
|
this.runnerDiv.setAttribute("class", className);
|
58
|
-
|
60
|
+
//do it twice for IE
|
61
|
+
this.runnerDiv.setAttribute("className", className);
|
62
|
+
var specs = runner.specs();
|
63
|
+
var specCount = 0;
|
64
|
+
for (var i = 0; i < specs.length; i++) {
|
65
|
+
if (this.specFilter(specs[i])) {
|
66
|
+
specCount++;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
59
70
|
message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
|
60
|
-
this.runnerMessageSpan.replaceChild(this.
|
71
|
+
this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
|
61
72
|
};
|
62
73
|
|
63
74
|
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
@@ -76,8 +87,8 @@ jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
|
76
87
|
status = 'skipped';
|
77
88
|
}
|
78
89
|
var specDiv = this.createDom('div', { className: 'spec ' + status },
|
79
|
-
this.createDom('a', { className: '
|
80
|
-
spec.getFullName());
|
90
|
+
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
|
91
|
+
this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, spec.getFullName()));
|
81
92
|
|
82
93
|
|
83
94
|
var resultItems = results.getItems();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
|
3
|
-
*
|
3
|
+
*
|
4
4
|
* @namespace
|
5
5
|
*/
|
6
6
|
var jasmine = {};
|
@@ -12,6 +12,12 @@ jasmine.unimplementedMethod_ = function() {
|
|
12
12
|
throw new Error("unimplemented method");
|
13
13
|
};
|
14
14
|
|
15
|
+
/**
|
16
|
+
* Large or small values here may result in slow test running & "Too much recursion" errors
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
jasmine.UPDATE_INTERVAL = 250;
|
20
|
+
|
15
21
|
/**
|
16
22
|
* Allows for bound functions to be comapred. Internal use only.
|
17
23
|
*
|
@@ -23,7 +29,14 @@ jasmine.unimplementedMethod_ = function() {
|
|
23
29
|
jasmine.bindOriginal_ = function(base, name) {
|
24
30
|
var original = base[name];
|
25
31
|
return function() {
|
26
|
-
|
32
|
+
if (original.apply) {
|
33
|
+
return original.apply(base, arguments);
|
34
|
+
} else {
|
35
|
+
//IE support
|
36
|
+
if (base == window) {
|
37
|
+
return window[name].apply(window, arguments);
|
38
|
+
}
|
39
|
+
}
|
27
40
|
};
|
28
41
|
};
|
29
42
|
|
@@ -65,10 +78,10 @@ jasmine.getEnv = function() {
|
|
65
78
|
*/
|
66
79
|
jasmine.isArray_ = function(value) {
|
67
80
|
return value &&
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
81
|
+
typeof value === 'object' &&
|
82
|
+
typeof value.length === 'number' &&
|
83
|
+
typeof value.splice === 'function' &&
|
84
|
+
!(value.propertyIsEnumerable('length'));
|
72
85
|
};
|
73
86
|
|
74
87
|
/**
|
@@ -117,7 +130,7 @@ jasmine.any = function(clazz) {
|
|
117
130
|
* Spies are torn down at the end of every spec.
|
118
131
|
*
|
119
132
|
* Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
120
|
-
*
|
133
|
+
*
|
121
134
|
* @example
|
122
135
|
* // a stub
|
123
136
|
* var myStub = jasmine.createSpy('myStub'); // can be used anywhere
|
@@ -162,7 +175,8 @@ jasmine.Spy = function(name) {
|
|
162
175
|
/**
|
163
176
|
* The acutal function this spy stubs.
|
164
177
|
*/
|
165
|
-
this.plan = function() {
|
178
|
+
this.plan = function() {
|
179
|
+
};
|
166
180
|
/**
|
167
181
|
* Tracking of the most recent call to the spy.
|
168
182
|
* @example
|
@@ -183,6 +197,7 @@ jasmine.Spy = function(name) {
|
|
183
197
|
* mySpy.argsForCall[1] = [7, 8];
|
184
198
|
*/
|
185
199
|
this.argsForCall = [];
|
200
|
+
this.calls = [];
|
186
201
|
};
|
187
202
|
|
188
203
|
/**
|
@@ -192,7 +207,7 @@ jasmine.Spy = function(name) {
|
|
192
207
|
* var foo = {
|
193
208
|
* bar: function() { // do some stuff }
|
194
209
|
* }
|
195
|
-
*
|
210
|
+
*
|
196
211
|
* // defining a spy on an existing property: foo.bar
|
197
212
|
* spyOn(foo, 'bar').andCallThrough();
|
198
213
|
*/
|
@@ -277,6 +292,7 @@ jasmine.Spy.prototype.reset = function() {
|
|
277
292
|
this.wasCalled = false;
|
278
293
|
this.callCount = 0;
|
279
294
|
this.argsForCall = [];
|
295
|
+
this.calls = [];
|
280
296
|
this.mostRecentCall = {};
|
281
297
|
};
|
282
298
|
|
@@ -286,22 +302,19 @@ jasmine.createSpy = function(name) {
|
|
286
302
|
spyObj.wasCalled = true;
|
287
303
|
spyObj.callCount++;
|
288
304
|
var args = jasmine.util.argsToArray(arguments);
|
289
|
-
//spyObj.mostRecentCall = {
|
290
|
-
// object: this,
|
291
|
-
// args: args
|
292
|
-
//};
|
293
305
|
spyObj.mostRecentCall.object = this;
|
294
306
|
spyObj.mostRecentCall.args = args;
|
295
307
|
spyObj.argsForCall.push(args);
|
308
|
+
spyObj.calls.push({object: this, args: args});
|
296
309
|
return spyObj.plan.apply(this, arguments);
|
297
310
|
};
|
298
311
|
|
299
312
|
var spy = new jasmine.Spy(name);
|
300
|
-
|
301
|
-
for(var prop in spy) {
|
313
|
+
|
314
|
+
for (var prop in spy) {
|
302
315
|
spyObj[prop] = spy[prop];
|
303
316
|
}
|
304
|
-
|
317
|
+
|
305
318
|
spyObj.reset();
|
306
319
|
|
307
320
|
return spyObj;
|
@@ -405,7 +418,7 @@ var waits = function(timeout) {
|
|
405
418
|
|
406
419
|
/**
|
407
420
|
* Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
|
408
|
-
*
|
421
|
+
*
|
409
422
|
* @param {Number} timeout
|
410
423
|
* @param {Function} latchFunction
|
411
424
|
* @param {String} message
|
@@ -517,7 +530,7 @@ jasmine.version_= {
|
|
517
530
|
"major": 0,
|
518
531
|
"minor": 9,
|
519
532
|
"build": 0,
|
520
|
-
"revision":
|
533
|
+
"revision": 1255662021
|
521
534
|
};
|
522
535
|
/**
|
523
536
|
* @namespace
|
@@ -591,9 +604,7 @@ jasmine.Env = function() {
|
|
591
604
|
|
592
605
|
this.reporter = new jasmine.MultiReporter();
|
593
606
|
|
594
|
-
this.updateInterval =
|
595
|
-
|
596
|
-
this.updateInterval = 0;
|
607
|
+
this.updateInterval = jasmine.UPDATE_INTERVAL
|
597
608
|
this.lastUpdate = 0;
|
598
609
|
this.specFilter = function() {
|
599
610
|
return true;
|
@@ -1409,7 +1420,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) {
|
|
1409
1420
|
jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
|
1410
1421
|
for (var property in obj) {
|
1411
1422
|
if (property == '__Jasmine_been_here_before__') continue;
|
1412
|
-
fn(property, obj.__lookupGetter__(property) != null);
|
1423
|
+
fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
|
1413
1424
|
}
|
1414
1425
|
};
|
1415
1426
|
|
@@ -1479,7 +1490,7 @@ jasmine.Queue = function(env) {
|
|
1479
1490
|
this.offset = 0;
|
1480
1491
|
};
|
1481
1492
|
|
1482
|
-
jasmine.Queue.prototype.addBefore = function
|
1493
|
+
jasmine.Queue.prototype.addBefore = function(block) {
|
1483
1494
|
this.blocks.unshift(block);
|
1484
1495
|
};
|
1485
1496
|
|
@@ -1487,59 +1498,74 @@ jasmine.Queue.prototype.add = function(block) {
|
|
1487
1498
|
this.blocks.push(block);
|
1488
1499
|
};
|
1489
1500
|
|
1490
|
-
jasmine.Queue.prototype.insertNext = function
|
1501
|
+
jasmine.Queue.prototype.insertNext = function(block) {
|
1491
1502
|
this.blocks.splice((this.index + this.offset + 1), 0, block);
|
1492
1503
|
this.offset++;
|
1493
1504
|
};
|
1494
1505
|
|
1495
1506
|
jasmine.Queue.prototype.start = function(onComplete) {
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
if (self.blocks[0]) {
|
1500
|
-
self.blocks[0].execute(function () {
|
1501
|
-
self._next();
|
1502
|
-
});
|
1503
|
-
} else {
|
1504
|
-
self.finish();
|
1505
|
-
}
|
1507
|
+
this.running = true;
|
1508
|
+
this.onComplete = onComplete;
|
1509
|
+
this.next_();
|
1506
1510
|
};
|
1507
1511
|
|
1508
|
-
jasmine.Queue.prototype.isRunning = function
|
1512
|
+
jasmine.Queue.prototype.isRunning = function() {
|
1509
1513
|
return this.running;
|
1510
1514
|
};
|
1511
1515
|
|
1512
|
-
jasmine.Queue.
|
1516
|
+
jasmine.Queue.LOOP_DONT_RECURSE = true;
|
1517
|
+
|
1518
|
+
jasmine.Queue.prototype.next_ = function() {
|
1513
1519
|
var self = this;
|
1514
|
-
var
|
1515
|
-
|
1516
|
-
|
1520
|
+
var goAgain = true;
|
1521
|
+
|
1522
|
+
while (goAgain) {
|
1523
|
+
goAgain = false;
|
1524
|
+
|
1517
1525
|
if (self.index < self.blocks.length) {
|
1518
|
-
|
1519
|
-
|
1520
|
-
});
|
1521
|
-
} else {
|
1522
|
-
self.finish();
|
1523
|
-
}
|
1524
|
-
};
|
1525
|
-
var now = new Date().getTime();
|
1526
|
-
if (this.env.updateInterval && now - this.env.lastUpdate > this.env.updateInterval) {
|
1527
|
-
this.env.lastUpdate = now;
|
1528
|
-
this.env.setTimeout(doNext, 0);
|
1529
|
-
} else {
|
1530
|
-
doNext();
|
1531
|
-
}
|
1526
|
+
var calledSynchronously = true;
|
1527
|
+
var completedSynchronously = false;
|
1532
1528
|
|
1533
|
-
|
1529
|
+
var onComplete = function () {
|
1530
|
+
if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
|
1531
|
+
completedSynchronously = true;
|
1532
|
+
return;
|
1533
|
+
}
|
1534
1534
|
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1535
|
+
self.offset = 0;
|
1536
|
+
self.index++;
|
1537
|
+
|
1538
|
+
var now = new Date().getTime();
|
1539
|
+
if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
|
1540
|
+
self.env.lastUpdate = now;
|
1541
|
+
self.env.setTimeout(function() {
|
1542
|
+
self.next_();
|
1543
|
+
}, 0);
|
1544
|
+
} else {
|
1545
|
+
if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
|
1546
|
+
goAgain = true;
|
1547
|
+
} else {
|
1548
|
+
self.next_();
|
1549
|
+
}
|
1550
|
+
}
|
1551
|
+
};
|
1552
|
+
self.blocks[self.index].execute(onComplete);
|
1553
|
+
|
1554
|
+
calledSynchronously = false;
|
1555
|
+
if (completedSynchronously) {
|
1556
|
+
onComplete();
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
} else {
|
1560
|
+
self.running = false;
|
1561
|
+
if (self.onComplete) {
|
1562
|
+
self.onComplete();
|
1563
|
+
}
|
1564
|
+
}
|
1539
1565
|
}
|
1540
1566
|
};
|
1541
1567
|
|
1542
|
-
jasmine.Queue.prototype.results = function
|
1568
|
+
jasmine.Queue.prototype.results = function() {
|
1543
1569
|
var results = new jasmine.NestedResults();
|
1544
1570
|
for (var i = 0; i < this.blocks.length; i++) {
|
1545
1571
|
if (this.blocks[i].results) {
|
@@ -1639,6 +1665,15 @@ jasmine.Runner.prototype.getAllSuites = function() {
|
|
1639
1665
|
return this.suites_;
|
1640
1666
|
};
|
1641
1667
|
|
1668
|
+
jasmine.Runner.prototype.specs = function () {
|
1669
|
+
var suites = this.suites();
|
1670
|
+
var specs = [];
|
1671
|
+
for (var i = 0; i < suites.length; i++) {
|
1672
|
+
specs = specs.concat(suites[i].specs());
|
1673
|
+
}
|
1674
|
+
return specs;
|
1675
|
+
};
|
1676
|
+
|
1642
1677
|
|
1643
1678
|
jasmine.Runner.prototype.suites = function() {
|
1644
1679
|
return this.suites_;
|
@@ -2128,25 +2163,42 @@ jasmine.Clock = {
|
|
2128
2163
|
if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) {
|
2129
2164
|
throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
|
2130
2165
|
}
|
2131
|
-
},
|
2166
|
+
},
|
2132
2167
|
|
2133
2168
|
installed: null
|
2134
2169
|
};
|
2135
2170
|
jasmine.Clock.installed = jasmine.Clock.real;
|
2136
2171
|
|
2172
|
+
//else for IE support
|
2137
2173
|
window.setTimeout = function(funcToCall, millis) {
|
2138
|
-
|
2174
|
+
if (jasmine.Clock.installed.setTimeout.apply) {
|
2175
|
+
return jasmine.Clock.installed.setTimeout.apply(this, arguments);
|
2176
|
+
} else {
|
2177
|
+
return jasmine.Clock.installed.setTimeout(funcToCall, millis);
|
2178
|
+
}
|
2139
2179
|
};
|
2140
2180
|
|
2141
2181
|
window.setInterval = function(funcToCall, millis) {
|
2142
|
-
|
2182
|
+
if (jasmine.Clock.installed.setInterval.apply) {
|
2183
|
+
return jasmine.Clock.installed.setInterval.apply(this, arguments);
|
2184
|
+
} else {
|
2185
|
+
return jasmine.Clock.installed.setInterval(funcToCall, millis);
|
2186
|
+
}
|
2143
2187
|
};
|
2144
2188
|
|
2145
2189
|
window.clearTimeout = function(timeoutKey) {
|
2146
|
-
|
2190
|
+
if (jasmine.Clock.installed.clearTimeout.apply) {
|
2191
|
+
return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
|
2192
|
+
} else {
|
2193
|
+
return jasmine.Clock.installed.clearTimeout(timeoutKey);
|
2194
|
+
}
|
2147
2195
|
};
|
2148
2196
|
|
2149
2197
|
window.clearInterval = function(timeoutKey) {
|
2150
|
-
|
2198
|
+
if (jasmine.Clock.installed.clearTimeout.apply) {
|
2199
|
+
return jasmine.Clock.installed.clearInterval.apply(this, arguments);
|
2200
|
+
} else {
|
2201
|
+
return jasmine.Clock.installed.clearInterval(timeoutKey);
|
2202
|
+
}
|
2151
2203
|
};
|
2152
2204
|
|
@@ -1,38 +1,26 @@
|
|
1
1
|
body {
|
2
|
-
font:
|
2
|
+
font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
|
3
3
|
}
|
4
4
|
|
5
|
-
h1 {
|
6
|
-
padding-top: 20px;
|
7
|
-
font-weight: bold;
|
8
|
-
font: 24px; /* "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; */
|
9
|
-
}
|
10
5
|
|
11
|
-
|
12
|
-
|
13
|
-
padding-left: 20px;
|
6
|
+
body .run_spec {
|
7
|
+
float:right;
|
14
8
|
}
|
15
9
|
|
16
|
-
.
|
17
|
-
|
18
|
-
padding-left: 20px;
|
19
|
-
color: red;
|
10
|
+
.runner.running {
|
11
|
+
background-color: yellow;
|
20
12
|
}
|
21
13
|
|
22
|
-
|
23
|
-
color: red;
|
24
|
-
}
|
14
|
+
|
25
15
|
|
26
16
|
.runner {
|
27
|
-
border: 1px
|
17
|
+
border: 1px solid gray;
|
28
18
|
margin: 5px;
|
29
19
|
padding-left: 1em;
|
30
20
|
padding-right: 1em;
|
31
21
|
}
|
32
22
|
|
33
|
-
|
34
|
-
background-color: yellow;
|
35
|
-
}
|
23
|
+
|
36
24
|
|
37
25
|
.suite {
|
38
26
|
border: 1px outset gray;
|
@@ -54,11 +42,11 @@ p {
|
|
54
42
|
}
|
55
43
|
|
56
44
|
.passed {
|
57
|
-
background-color:
|
45
|
+
background-color: #cfc;
|
58
46
|
}
|
59
47
|
|
60
48
|
.failed {
|
61
|
-
background-color:
|
49
|
+
background-color: #fdd;
|
62
50
|
}
|
63
51
|
|
64
52
|
.skipped {
|
@@ -66,9 +54,9 @@ p {
|
|
66
54
|
background-color: #eee;
|
67
55
|
}
|
68
56
|
|
69
|
-
|
70
|
-
white-space: pre
|
71
|
-
}
|
57
|
+
/*.resultMessage {*/
|
58
|
+
/*white-space: pre;*/
|
59
|
+
/*}*/
|
72
60
|
|
73
61
|
.stackTrace {
|
74
62
|
white-space: pre;
|
@@ -81,10 +69,6 @@ p {
|
|
81
69
|
background: #eef;
|
82
70
|
}
|
83
71
|
|
84
|
-
.runSpec {
|
85
|
-
margin-left: 5px;
|
86
|
-
float: right;
|
87
|
-
}
|
88
72
|
|
89
73
|
#jasmine_content {
|
90
74
|
position:fixed;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jasmine_webos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Gaffney
|
@@ -9,8 +9,8 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
13
|
-
default_executable:
|
12
|
+
date: 2009-10-28 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thin
|
@@ -42,7 +42,9 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 2.3.3
|
44
44
|
version:
|
45
|
-
description:
|
45
|
+
description: |-
|
46
|
+
Generates the stub files needed for testing with jasmine on a webos application.
|
47
|
+
Runs a server to view your tests against.
|
46
48
|
email:
|
47
49
|
- mr.gaffo@gmail.com
|
48
50
|
executables:
|
@@ -76,11 +78,6 @@ files:
|
|
76
78
|
- vendor/jasmine/contrib/ruby/jasmine_runner.rb
|
77
79
|
- vendor/jasmine/contrib/ruby/spec/jasmine_runner_spec.rb
|
78
80
|
- jslib/prototype.js
|
79
|
-
- test/test_helper.rb
|
80
|
-
- test/jasminewebos/test_server.rb
|
81
|
-
- test/jasminewebos/test_configuration.rb
|
82
|
-
- test/jasminewebos/test_jasminewebos_cli.rb
|
83
|
-
- test/test_jasminewebos.rb
|
84
81
|
has_rdoc: true
|
85
82
|
homepage: http://github.com/gaffo/jasmine_webos
|
86
83
|
licenses: []
|
@@ -108,7 +105,7 @@ requirements: []
|
|
108
105
|
rubyforge_project: jasmine_webos
|
109
106
|
rubygems_version: 1.3.5
|
110
107
|
signing_key:
|
111
|
-
specification_version:
|
108
|
+
specification_version: 3
|
112
109
|
summary: Generates the stub files needed for testing with jasmine on a webos application
|
113
110
|
test_files:
|
114
111
|
- test/test_helper.rb
|