summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2013-08-13 10:50:50 +0200
committerGarren Smith <garren.smith@gmail.com>2013-08-13 15:26:52 +0200
commitcab37a1e117fb9c7c05858bad7cd45049e091145 (patch)
tree2173f1340982df5cac8b36b7418adc496574aedc
parent9d99f069371ea6c8abe7cf14c2ca6e43966705db (diff)
downloadcouchdb-cab37a1e117fb9c7c05858bad7cd45049e091145.tar.gz
fixing failing test
-rw-r--r--.gitignore1
-rw-r--r--src/fauxton/test/core/routeObjectSpec.js15
-rw-r--r--src/fauxton/test/test.config.js71
3 files changed, 14 insertions, 73 deletions
diff --git a/.gitignore b/.gitignore
index 43d4773ad..a022b1412 100644
--- a/.gitignore
+++ b/.gitignore
@@ -122,3 +122,4 @@ test/javascript/run_js_tests.sh
test/local.ini
tmp
utils/run
+src/fauxton/test/test.config.js
diff --git a/src/fauxton/test/core/routeObjectSpec.js b/src/fauxton/test/core/routeObjectSpec.js
index 45d95acaf..d043d6356 100644
--- a/src/fauxton/test/core/routeObjectSpec.js
+++ b/src/fauxton/test/core/routeObjectSpec.js
@@ -1,3 +1,14 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
define([
'api',
'testUtils'
@@ -65,7 +76,7 @@ define([
getViewsSpy = sinon.stub(testRouteObject,"getViews"),
viewSpy = sinon.stub(view, "establish");
- sinon.stub(view, "hasRendered").returns(false);
+ view.hasRendered = false;
getViewsSpy.returns({'#view': view});
testRouteObject.renderWith('the-route', mockLayout, 'args');
@@ -77,7 +88,7 @@ define([
getViewsSpy = sinon.stub(testRouteObject,"getViews"),
viewSpy = sinon.stub(view, "establish");
- sinon.stub(view, "hasRendered").returns(true);
+ view.hasRendered = true;
getViewsSpy.returns({'#view': view});
testRouteObject.renderWith('the-route', mockLayout, 'args');
diff --git a/src/fauxton/test/test.config.js b/src/fauxton/test/test.config.js
deleted file mode 100644
index f876bb3b1..000000000
--- a/src/fauxton/test/test.config.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// vim: set ft=javascript:
-// Set the require.js configuration for your test setup.
-require.config(
-{
- "paths": {
- "libs": "../assets/js/libs",
- "plugins": "../assets/js/plugins",
- "jquery": "../assets/js/libs/jquery",
- "lodash": "../assets/js/libs/lodash",
- "backbone": "../assets/js/libs/backbone",
- "bootstrap": "../assets/js/libs/bootstrap",
- "codemirror": "../assets/js/libs/codemirror",
- "jshint": "../assets/js/libs/jshint",
- "d3": "../assets/js/libs/d3",
- "nv.d3": "../assets/js/libs/nv.d3",
- "chai": "../test/mocha/chai",
- "sinon-chai": "../test/mocha/sinon-chai",
- "testUtils": "../test/mocha/testUtils"
- },
- "baseUrl": "../app",
- "shim": {
- "backbone": {
- "deps": [
- "lodash",
- "jquery"
- ],
- "exports": "Backbone"
- },
- "bootstrap": {
- "deps": [
- "jquery"
- ],
- "exports": "Bootstrap"
- },
- "codemirror": {
- "deps": [
- "jquery"
- ],
- "exports": "CodeMirror"
- },
- "jshint": {
- "deps": [
- "jquery"
- ],
- "exports": "JSHINT"
- },
- "plugins/backbone.layoutmanager": [
- "backbone"
- ],
- "plugins/codemirror-javascript": [
- "codemirror"
- ],
- "plugins/prettify": [],
- "plugins/jquery.form": [
- "jquery"
- ]
- }
-}
-);
-
-require([
-
- '.././test/core/routeObjectSpec.js',
-
- '.././app/addons/logs/tests/logSpec.js',
-
-], function() {
- if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
- else { mocha.run(); }
-});
-