Permalink
Browse files

make allowances for Windows-style paths when testing

  • Loading branch information...
1 parent 378572a commit a3c2147e17f4c103d9cded19457b208f4ee11bd1 @benblank benblank committed Jun 16, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 node_modules/wrench/wrench.js
  2. +2 −2 test/jasmine-jsdoc.js
Oops, something went wrong.
View
@@ -15,7 +15,7 @@ jasmine.loadHelpersInFolder = function(folder, matcher) {
helpers = helperCollection.getSpecs();
for ( var i = 0, len = helpers.length; i < len; ++i) {
var file = helpers[i].path();
- var helper = require(file.replace(/\.*$/, ""));
+ var helper = require(file.replace(/\\/g, '/').replace(new RegExp('^' + __dirname + '/'), "").replace(/\.*$/, ""));
for (var key in helper) {
this[key] = helper[key];
@@ -79,7 +79,7 @@ jasmine.executeSpecsInFolder = function(folder, done, verbose, matcher) {
var specsList = specs.getSpecs();
for ( var i = 0, len = specsList.length; i < len; ++i) {
var filename = specsList[i];
- require(filename.path().replace(/\.\w+$/, ""));
+ require(filename.path().replace(/\\/g, '/').replace(new RegExp('^' + __dirname + '/'), "").replace(/\.\w+$/, ""));
}
//Run Jasmine

0 comments on commit a3c2147

Please sign in to comment.