moved frameworks to a separate directory; made a sample spec helper that installs correct Ajax library. Protoype is GREEN
This commit is contained in:
parent
5833dd806c
commit
ace08b274e
@ -11,7 +11,7 @@
|
|||||||
# - dist/**/*.js
|
# - dist/**/*.js
|
||||||
#
|
#
|
||||||
src_files:
|
src_files:
|
||||||
- lib/prototype.js
|
- frameworks/prototype.js
|
||||||
- examples/prototype/public/javascripts/**/*.js
|
- examples/prototype/public/javascripts/**/*.js
|
||||||
|
|
||||||
# stylesheets
|
# stylesheets
|
||||||
@ -38,8 +38,8 @@ stylesheets:
|
|||||||
# - helpers/**/*.js
|
# - helpers/**/*.js
|
||||||
#
|
#
|
||||||
helpers:
|
helpers:
|
||||||
|
- lib/spec-helper.js
|
||||||
- examples/prototype/spec/javascripts/helpers/**/*.js
|
- examples/prototype/spec/javascripts/helpers/**/*.js
|
||||||
- spec/javascripts/helpers/spec-helper.js
|
|
||||||
|
|
||||||
# spec_files
|
# spec_files
|
||||||
#
|
#
|
||||||
|
0
lib/jquery.js → frameworks/jquery.js
vendored
0
lib/jquery.js → frameworks/jquery.js
vendored
16
lib/spec-helper.js
Normal file
16
lib/spec-helper.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
beforeEach(function() {
|
||||||
|
|
||||||
|
if (typeof jQuery != 'undefined') {
|
||||||
|
spyOn(jQuery.ajaxSettings, 'xhr').andCallFake(function() {
|
||||||
|
var newXhr = new FakeXMLHttpRequest();
|
||||||
|
ajaxRequests.push(newXhr);
|
||||||
|
return newXhr;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
spyOn(Ajax, "getTransport").andCallFake(function() {
|
||||||
|
return new FakeXMLHttpRequest();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
clearAjaxRequests();
|
||||||
|
|
||||||
|
});
|
@ -1,8 +1,9 @@
|
|||||||
src_dir: .
|
src_dir: .
|
||||||
|
|
||||||
src_files:
|
src_files:
|
||||||
- lib/prototype.js
|
- frameworks/prototype.js
|
||||||
- lib/**/*.js
|
- frameworks/jquery.js
|
||||||
|
- lib/mock-ajax.js
|
||||||
|
|
||||||
spec_dir:
|
spec_dir:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user