Moved currentlyRunningTests to Runner instead of spec
This commit is contained in:
@@ -258,7 +258,7 @@ ul.inheritsList
|
||||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:58 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -300,7 +300,7 @@ ul.inheritsList
|
||||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:58 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -384,9 +384,7 @@ ul.inheritsList
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
A function that is called after each spec in a suite.
|
||||
|
||||
Used for restoring any state that is hijacked during spec execution.
|
||||
A function that is called after each spec in a suite.
|
||||
|
||||
Used for restoring any state that is hijacked during spec execution.
|
||||
|
||||
@@ -425,9 +423,7 @@ Used for restoring any state that is hijacked during spec execution.
|
||||
|
||||
<b>beforeEach</b>(beforeEachFunction)
|
||||
|
||||
A function that is called before each spec in a suite.
|
||||
|
||||
Used for spec setup, including validating assumptions.
|
||||
</div>
|
||||
<div class="description">
|
||||
A function that is called before each spec in a suite.
|
||||
|
||||
@@ -466,11 +462,7 @@ Used for spec setup, including validating assumptions.
|
||||
<div class="fixedFont">
|
||||
|
||||
|
||||
Defines a suite of specifications.
|
||||
|
||||
Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
|
||||
are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
||||
of setup in some tests.
|
||||
<b>describe</b>(description, specDefinitions)
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
@@ -480,9 +472,7 @@ of setup in some tests.
|
||||
are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
||||
of setup in some tests.
|
||||
|
||||
<pre class="code">// TODO: a simple suite
|
||||
|
||||
// TODO: a simple suite with a nested describe block</pre>
|
||||
<br />
|
||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||
|
||||
|
||||
@@ -521,10 +511,7 @@ of setup in some tests.
|
||||
|
||||
|
||||
|
||||
Starts a chain for a Jasmine expectation.
|
||||
|
||||
It is passed an Object that is the actual value and should chain to one of the many
|
||||
jasmine.Matchers functions.
|
||||
<hr />
|
||||
|
||||
<a name="expect"> </a>
|
||||
<div class="fixedFont">
|
||||
@@ -563,9 +550,7 @@ jasmine.Matchers functions.
|
||||
|
||||
|
||||
|
||||
Creates a Jasmine spec that will be added to the current suite.
|
||||
|
||||
// TODO: pending tests
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
@@ -575,9 +560,7 @@ jasmine.Matchers functions.
|
||||
|
||||
|
||||
<b>it</b>(desc, func)
|
||||
<pre class="code">it('should be true', function() {
|
||||
expect(true).toEqual(true);
|
||||
});</pre>
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
Creates a Jasmine spec that will be added to the current suite.
|
||||
@@ -665,11 +648,7 @@ jasmine.Matchers functions.
|
||||
<hr />
|
||||
|
||||
<a name="spyOn"> </a>
|
||||
<pre class="code">// spy example
|
||||
var foo = {
|
||||
not: function(bool) { return !bool; }
|
||||
}
|
||||
spyOn(foo, 'not'); // actual foo.not will not be called, execution stops</pre>
|
||||
<div class="fixedFont">
|
||||
|
||||
|
||||
<b>spyOn</b>(obj, methodName)
|
||||
@@ -857,9 +836,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops</pre>
|
||||
<span class="light fixedFont">{Function}</span> <b>specDefinitions</b>
|
||||
|
||||
</dt>
|
||||
Creates a <em>disabled</em> Jasmine spec.
|
||||
|
||||
A convenience method that allows existing specs to be disabled temporarily during development.
|
||||
<dd>function that defines several specs.</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
@@ -908,7 +885,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
|
||||
</dt>
|
||||
<dd>defines the preconditions and expectations of the spec</dd>
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -507,7 +507,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -316,7 +316,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -316,7 +316,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -700,7 +700,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -316,7 +316,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -418,7 +418,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -396,7 +396,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:58 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -412,46 +412,15 @@ ul.inheritsList
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
||||
|
||||
Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
|
||||
expectation syntax. Spies can be checked if they were called or not and what the calling params were.
|
||||
|
||||
A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
|
||||
Spies are torn down at the end of every spec.
|
||||
|
||||
Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
||||
Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
||||
|
||||
Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
|
||||
expectation syntax. Spies can be checked if they were called or not and what the calling params were.
|
||||
|
||||
A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
|
||||
<pre class="code">// a stub
|
||||
var myStub = jasmine.createSpy('myStub'); // can be used anywhere
|
||||
|
||||
// spy example
|
||||
var foo = {
|
||||
not: function(bool) { return !bool; }
|
||||
}
|
||||
|
||||
// actual foo.not will not be called, execution stops
|
||||
spyOn(foo, 'not');
|
||||
|
||||
// foo.not spied upon, execution will continue to implementation
|
||||
spyOn(foo, 'not').andCallThrough();
|
||||
|
||||
// fake example
|
||||
var foo = {
|
||||
not: function(bool) { return !bool; }
|
||||
}
|
||||
|
||||
// foo.not(val) will return val
|
||||
spyOn(foo, 'not').andCallFake(function(value) {return value;});
|
||||
|
||||
// mock example
|
||||
foo.not(7 == 7);
|
||||
expect(foo.not).wasCalled();
|
||||
expect(foo.not).wasCalledWith(true);</pre>
|
||||
Spies are torn down at the end of every spec.
|
||||
|
||||
Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
||||
|
||||
</div>
|
||||
|
||||
@@ -506,12 +475,7 @@ expect(foo.not).wasCalledWith(true);</pre>
|
||||
|
||||
|
||||
<dl class="detailList">
|
||||
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
||||
mySpy(1, 2);
|
||||
mySpy(7, 8);
|
||||
mySpy.mostRecentCall.args = [7, 8];
|
||||
mySpy.argsForCall[0] = [1, 2];
|
||||
mySpy.argsForCall[1] = [7, 8];</pre>
|
||||
<dt class="heading">See:</dt>
|
||||
|
||||
<dd><a href="../symbols/_global_.html#spyOn">spyOn</a>, jasmine.createSpy, jasmine.createSpyObj</dd>
|
||||
|
||||
@@ -581,9 +545,7 @@ mySpy.argsForCall[1] = [7, 8];</pre>
|
||||
<hr />
|
||||
|
||||
<a name="isSpy"> </a>
|
||||
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
||||
mySpy(1, 2);
|
||||
mySpy.mostRecentCall.args = [1, 2];</pre>
|
||||
<div class="fixedFont">
|
||||
|
||||
|
||||
<b>isSpy</b>
|
||||
@@ -617,14 +579,7 @@ mySpy.mostRecentCall.args = [1, 2];</pre>
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="code">var baz = function() {
|
||||
// do some stuff, return something
|
||||
}
|
||||
// defining a spy from scratch: foo() calls the function baz
|
||||
var foo = jasmine.createSpy('spy on foo').andCall(baz);
|
||||
|
||||
// defining a spy on an existing property: foo.bar() calls an anonymnous function
|
||||
spyOn(foo, 'bar').andCall(function() { return 'baz';} );</pre>
|
||||
|
||||
|
||||
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
||||
mySpy(1, 2);
|
||||
@@ -664,12 +619,7 @@ spyOn(foo, 'bar').andCall(function() { return 'baz';} );</pre>
|
||||
|
||||
<pre class="code">var baz = function() {
|
||||
// do some stuff, return something
|
||||
<pre class="code">var foo = {
|
||||
bar: function() { // do some stuff }
|
||||
}
|
||||
|
||||
// defining a spy on an existing property: foo.bar
|
||||
spyOn(foo, 'bar').andCallThrough();</pre>
|
||||
}
|
||||
// defining a spy from scratch: foo() calls the function baz
|
||||
var foo = jasmine.createSpy('spy on foo').andCall(baz);
|
||||
|
||||
@@ -698,11 +648,7 @@ spyOn(foo, 'bar').andCallThrough();</pre>
|
||||
|
||||
|
||||
<hr />
|
||||
<pre class="code">// defining a spy from scratch: foo() returns 'baz'
|
||||
var foo = jasmine.createSpy('spy on foo').andReturn('baz');
|
||||
|
||||
// defining a spy on an existing property: foo.bar() returns 'baz'
|
||||
spyOn(foo, 'bar').andReturn('baz');</pre>
|
||||
|
||||
<a name="andCallThrough"> </a>
|
||||
<div class="fixedFont">
|
||||
|
||||
@@ -742,11 +688,7 @@ spyOn(foo, 'bar').andReturn('baz');</pre>
|
||||
|
||||
|
||||
<b>andReturn</b>(value)
|
||||
<pre class="code">// defining a spy from scratch: foo() throws an exception w/ message 'ouch'
|
||||
var foo = jasmine.createSpy('spy on foo').andThrow('baz');
|
||||
|
||||
// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
|
||||
spyOn(foo, 'bar').andThrow('baz');</pre>
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
For setting the return value of a spy.
|
||||
@@ -811,15 +753,7 @@ spyOn(foo, 'bar').andThrow('baz');</pre>
|
||||
|
||||
<dl class="detailList">
|
||||
<dt class="heading">Parameters:</dt>
|
||||
<pre class="code">spyOn(foo, 'bar');
|
||||
|
||||
foo.bar();
|
||||
|
||||
expect(foo.bar.callCount).toEqual(1);
|
||||
|
||||
foo.bar.reset();
|
||||
|
||||
expect(foo.bar.callCount).toEqual(0);</pre>
|
||||
|
||||
<dt>
|
||||
<span class="light fixedFont">{String}</span> <b>exceptionMsg</b>
|
||||
|
||||
@@ -845,7 +779,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
The acutal function this spy stubs.
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -436,7 +436,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:58 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -339,8 +339,7 @@ ul.inheritsList
|
||||
<td class="nameDescription">
|
||||
<div class="fixedFont">jasmine.<b><a href="../symbols/jasmine.html#.include">include</a></b>(url, opt_global)
|
||||
</div>
|
||||
<div class="description">Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||
Jasmine environment.</div>
|
||||
<div class="description">Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||
Jasmine environment.</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -461,8 +460,7 @@ Jasmine environment.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<pre class="code">// don't care about which function is passed in, as long as it's a function
|
||||
expect(mySpy).wasCalledWith(jasmine.any(Function));</pre>
|
||||
|
||||
<pre class="code">// don't care about which function is passed in, as long as it's a function
|
||||
expect(mySpy).wasCalledWith(jasmine.any(Function));</pre>
|
||||
|
||||
@@ -502,8 +500,7 @@ expect(mySpy).wasCalledWith(jasmine.any(Function));</pre>
|
||||
|
||||
<span class="light">jasmine.</span><b>createSpyObj</b>(baseName, methodNames)
|
||||
|
||||
Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
|
||||
large in one call.
|
||||
</div>
|
||||
<div class="description">
|
||||
Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
|
||||
large in one call.
|
||||
@@ -570,8 +567,7 @@ large in one call.
|
||||
|
||||
|
||||
<span class="light">jasmine.</span><b>include</b>(url, opt_global)
|
||||
Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||
Jasmine environment.
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||
@@ -728,7 +724,7 @@ Jasmine environment.
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ ul.inheritsList
|
||||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:25:31 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Oct 21 2009 09:32:58 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -530,7 +530,7 @@ jasmine.version_= {
|
||||
"major": 0,
|
||||
"minor": 10,
|
||||
"build": 0,
|
||||
"revision": 1256142331
|
||||
"revision": 1256142778
|
||||
};
|
||||
/**
|
||||
* @namespace
|
||||
@@ -978,11 +978,6 @@ jasmine.Matchers.pp = function(str) {
|
||||
return jasmine.util.htmlEscape(jasmine.pp(str));
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.getResults = function() {
|
||||
return this.results_;
|
||||
};
|
||||
|
||||
jasmine.Matchers.prototype.results = function() {
|
||||
return this.results_;
|
||||
};
|
||||
@@ -1039,8 +1034,6 @@ jasmine.Matchers.prototype.toEqual = function(expected) {
|
||||
matcherName: 'toEqual', expected: expected, actual: this.actual
|
||||
});
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual
|
||||
@@ -1050,8 +1043,6 @@ jasmine.Matchers.prototype.toNotEqual = function(expected) {
|
||||
return this.report(!this.env.equals_(this.actual, expected),
|
||||
'Expected ' + jasmine.Matchers.pp(expected) + ' to not equal ' + jasmine.Matchers.pp(this.actual) + ', but it does.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_not_equal = jasmine.Matchers.prototype.toNotEqual;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
|
||||
@@ -1063,8 +1054,6 @@ jasmine.Matchers.prototype.toMatch = function(reg_exp) {
|
||||
return this.report((new RegExp(reg_exp).test(this.actual)),
|
||||
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to match ' + reg_exp + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_match = jasmine.Matchers.prototype.toMatch;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
|
||||
@@ -1074,8 +1063,6 @@ jasmine.Matchers.prototype.toNotMatch = function(reg_exp) {
|
||||
return this.report((!new RegExp(reg_exp).test(this.actual)),
|
||||
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to not match ' + reg_exp + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_not_match = jasmine.Matchers.prototype.toNotMatch;
|
||||
|
||||
/**
|
||||
* Matcher that compares the acutal to undefined.
|
||||
@@ -1084,8 +1071,6 @@ jasmine.Matchers.prototype.toBeDefined = function() {
|
||||
return this.report((this.actual !== undefined),
|
||||
'Expected a value to be defined but it was undefined.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_defined = jasmine.Matchers.prototype.toBeDefined;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to null.
|
||||
@@ -1095,8 +1080,6 @@ jasmine.Matchers.prototype.toBeNull = function() {
|
||||
return this.report((this.actual === null),
|
||||
'Expected a value to be null but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_null = jasmine.Matchers.prototype.toBeNull;
|
||||
|
||||
/**
|
||||
* Matcher that boolean not-nots the actual.
|
||||
@@ -1105,8 +1088,6 @@ jasmine.Matchers.prototype.toBeTruthy = function() {
|
||||
return this.report(!!this.actual,
|
||||
'Expected a value to be truthy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_truthy = jasmine.Matchers.prototype.toBeTruthy;
|
||||
|
||||
/**
|
||||
* Matcher that boolean nots the actual.
|
||||
@@ -1115,8 +1096,6 @@ jasmine.Matchers.prototype.toBeFalsy = function() {
|
||||
return this.report(!this.actual,
|
||||
'Expected a value to be falsy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_falsy = jasmine.Matchers.prototype.toBeFalsy;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was called.
|
||||
@@ -1131,8 +1110,6 @@ jasmine.Matchers.prototype.wasCalled = function() {
|
||||
return this.report((this.actual.wasCalled),
|
||||
'Expected spy "' + this.actual.identity + '" to have been called, but it was not.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.was_called = jasmine.Matchers.prototype.wasCalled;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was not called.
|
||||
@@ -1144,8 +1121,6 @@ jasmine.Matchers.prototype.wasNotCalled = function() {
|
||||
return this.report((!this.actual.wasCalled),
|
||||
'Expected spy "' + this.actual.identity + '" to not have been called, but it was.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.was_not_called = jasmine.Matchers.prototype.wasNotCalled;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
|
||||
@@ -1627,6 +1602,7 @@ jasmine.Runner = function(env) {
|
||||
jasmine.Runner.prototype.execute = function() {
|
||||
var self = this;
|
||||
if (self.env.reporter.reportRunnerStarting) {
|
||||
self.env.currentlyRunningTests = true;
|
||||
self.env.reporter.reportRunnerStarting(this);
|
||||
}
|
||||
self.queue.start(function () {
|
||||
@@ -1646,6 +1622,7 @@ jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
|
||||
|
||||
|
||||
jasmine.Runner.prototype.finishCallback = function() {
|
||||
this.env.currentlyRunningTests = true;
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
};
|
||||
|
||||
@@ -1660,11 +1637,6 @@ jasmine.Runner.prototype.add = function(block) {
|
||||
this.queue.add(block);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Runner.prototype.getAllSuites = function() {
|
||||
return this.suites_;
|
||||
};
|
||||
|
||||
jasmine.Runner.prototype.specs = function () {
|
||||
var suites = this.suites();
|
||||
var specs = [];
|
||||
@@ -1682,11 +1654,6 @@ jasmine.Runner.prototype.suites = function() {
|
||||
jasmine.Runner.prototype.results = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Runner.prototype.getResults = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
/**
|
||||
* Internal representation of a Jasmine specification, or test.
|
||||
*
|
||||
@@ -1732,11 +1699,6 @@ jasmine.Spec.prototype.log = function(message) {
|
||||
return this.results_.log(message);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Spec.prototype.getResults = function() {
|
||||
return this.results_;
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.runs = function (func) {
|
||||
var block = new jasmine.Block(this.env, func, this);
|
||||
this.addToQueue(block);
|
||||
@@ -1751,14 +1713,6 @@ jasmine.Spec.prototype.addToQueue = function (block) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @deprecated
|
||||
*/
|
||||
jasmine.Spec.prototype.expects_that = function(actual) {
|
||||
return this.expect(actual);
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.expect = function(actual) {
|
||||
return new (this.getMatchersClass_())(this.env, actual, this.results_);
|
||||
};
|
||||
@@ -1943,11 +1897,6 @@ jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
|
||||
this.after_.push(afterEachFunction);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Suite.prototype.getResults = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.results = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
@@ -1961,11 +1910,6 @@ jasmine.Suite.prototype.add = function(block) {
|
||||
this.queue.add(block);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Suite.prototype.specCount = function() {
|
||||
return this.specs_.length;
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.specs = function() {
|
||||
return this.specs_;
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@ jasmine.Runner = function(env) {
|
||||
jasmine.Runner.prototype.execute = function() {
|
||||
var self = this;
|
||||
if (self.env.reporter.reportRunnerStarting) {
|
||||
self.env.currentlyRunningTests = true;
|
||||
self.env.reporter.reportRunnerStarting(this);
|
||||
}
|
||||
self.queue.start(function () {
|
||||
@@ -35,6 +36,7 @@ jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
|
||||
|
||||
|
||||
jasmine.Runner.prototype.finishCallback = function() {
|
||||
this.env.currentlyRunningTests = true;
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
};
|
||||
|
||||
@@ -65,4 +67,4 @@ jasmine.Runner.prototype.suites = function() {
|
||||
|
||||
jasmine.Runner.prototype.results = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user