Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace findit with walkdir (close #73)

This fixes step definition and support code loading on Windows.
  • Loading branch information...
commit 02577cd5189634bc30ebefe862e6933d667ae7cd 1 parent 5d4c2d2
Aaron Garvey authored jbpros committed
View
4 lib/cucumber/cli/argument_parser/path_expander.js
@@ -1,6 +1,6 @@
var fs = require('fs');
var _ = require('underscore');
-var findit = require('findit');
+var walk = require('walkdir');
var PathExpander = {
expandPathsWithRegexp: function expandPathsWithRegexp(paths, regexp) {
@@ -26,7 +26,7 @@ var PathExpander = {
expandDirectoryWithRegexp: function expandDirectoryWithRegexp(directory, regexp) {
var paths = [];
- var scannedPaths = findit.sync(directory);
+ var scannedPaths = walk.sync(directory);
scannedPaths.forEach(function(path) {
if (regexp.test(path))
paths.push(path);
View
2  package.json
@@ -35,7 +35,7 @@
, "rimraf" : "2.0.2"
, "mkdirp" : "0.3.3"
, "cucumber-html": "0.2.0"
- , "findit": "0.1.2"
+ , "walkdir": "0.0.4"
, "coffee-script": "1.3.3"
}
, "scripts" :
View
6 spec/cucumber/cli/argument_parser/path_expander_spec.js
@@ -93,19 +93,19 @@ describe("Cucumber.Cli.ArgumentParser.PathExpander", function() {
});
describe("expandDirectoryWithRegexp()", function() {
- var findit = require('findit');
+ var walkdir = require('walkdir');
var directory, regexp, innerPaths;
beforeEach(function() {
directory = createSpy("directory");
regexp = createSpyWithStubs("regexp", {test: null});
innerPaths = [createSpy("inner path 1"), createSpy("inner path 2"), createSpy("inner path 3")];
- spyOn(findit, 'sync').andReturn(innerPaths);
+ spyOn(walkdir, 'sync').andReturn(innerPaths);
});
it("recursively finds the directory inner paths", function() {
PathExpander.expandDirectoryWithRegexp(directory, regexp);
- expect(findit.sync).toHaveBeenCalledWith(directory);
+ expect(walkdir.sync).toHaveBeenCalledWith(directory);
});
it("tests the regexp against each inner path", function() {
Please sign in to comment.
Something went wrong with that request. Please try again.