Skip to content

Commit

Permalink
add settings.js to required specs in case local_settings is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcher committed Feb 2, 2010
1 parent 74c27c4 commit bdbe02f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .local_settings.js
@@ -0,0 +1,15 @@

/**
* This file provides local settings you'll need to modify to make sure
* envjs platform tests can function properly. Dont modify this
* file directly, copy it to local_settings.js and then modify it so
* as not to commit your local settings back to the repo.
*/

var SETTINGS = {

BASE_URI : 'file:///opt/tomcat/webapps/env-js/',

AJAX_BASE: 'http://localhost:8080/env-js/'

};
2 changes: 1 addition & 1 deletion settings.js
Expand Up @@ -8,7 +8,7 @@

var SETTINGS = {

BASE_URI : 'file://opt/webapps/tomcat/env-js/',
BASE_URI : 'file://mnt/repos/thatcher',

AJAX_BASE: 'http://localhost:8080/env-js/'

Expand Down
7 changes: 2 additions & 5 deletions test/specs/env/spec.js
Expand Up @@ -37,11 +37,8 @@ _load('dist/platform/core.js');
_load('dist/platform/rhino.js');
_load('dist/console.js');
_load('src/common/__extend__.js');
try{
_load('local_settings.js');
}catch(e){
_load('settings.js');
}
_load('settings.js');
_load('local_settings.js');

module('rhino');

Expand Down
8 changes: 2 additions & 6 deletions test/specs/window/spec.js
Expand Up @@ -24,12 +24,8 @@ try{
_load('dist/parser.js');
_load('dist/xhr.js');
_load('dist/window.js');

try{
_load('local_settings.js');
}catch(e){
_load('settings.js');
}
_load('settings.js');
_load('local_settings.js');

//mock the window and document in envjs
new Window(__this__, __this__);
Expand Down
7 changes: 2 additions & 5 deletions test/specs/xhr/spec.js
Expand Up @@ -42,11 +42,8 @@ _load('dist/html.js');
_load('dist/timer.js');
_load('dist/parser.js');
_load('dist/xhr.js');
try{
_load('local_settings.js');
}catch(e){
_load('settings.js');
}
_load('settings.js');
_load('local_settings.js');

module('xhr');

Expand Down

0 comments on commit bdbe02f

Please sign in to comment.