Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for Node 0.6

  • Loading branch information...
commit ca751a820ccbbfd03909cdfda350ff997ff8dd00 1 parent a8838af
@jbpros jbpros authored
Showing with 49 additions and 42 deletions.
  1. +6 −1 .travis.yml
  2. +1 −1  README.md
  3. +1 −1  package.json
  4. +1 −1  spec/cucumber/ast/background_spec.js
  5. +1 −1  spec/cucumber/ast/data_table/row_spec.js
  6. +1 −1  spec/cucumber/ast/data_table_spec.js
  7. +1 −1  spec/cucumber/ast/doc_string_spec.js
  8. +1 −1  spec/cucumber/ast/feature_spec.js
  9. +1 −1  spec/cucumber/ast/features_spec.js
  10. +1 −1  spec/cucumber/ast/scenario_spec.js
  11. +1 −1  spec/cucumber/ast/step_spec.js
  12. +1 −1  spec/cucumber/cli/argument_parser/feature_path_expander_spec.js
  13. +1 −1  spec/cucumber/cli/argument_parser/path_expander_spec.js
  14. +1 −1  spec/cucumber/cli/argument_parser/support_code_path_expander_spec.js
  15. +2 −2 spec/cucumber/cli/argument_parser_spec.js
  16. +1 −1  spec/cucumber/cli/configuration_spec.js
  17. +1 −1  spec/cucumber/cli/feature_source_loader_spec.js
  18. +1 −1  spec/cucumber/cli/support_code_loader_spec.js
  19. +1 −1  spec/cucumber/cli_spec.js
  20. +1 −1  spec/cucumber/listener/progress_formatter_spec.js
  21. +1 −1  spec/cucumber/parser_spec.js
  22. +1 −1  spec/cucumber/runtime/ast_tree_walker/event_spec.js
  23. +1 −1  spec/cucumber/runtime/ast_tree_walker_spec.js
  24. +1 −1  spec/cucumber/runtime/failed_step_result_spec.js
  25. +1 −1  spec/cucumber/runtime/pending_step_result_spec.js
  26. +1 −1  spec/cucumber/runtime/successful_step_result_spec.js
  27. +1 −1  spec/cucumber/runtime_spec.js
  28. +1 −1  spec/cucumber/support_code/library_spec.js
  29. +1 −1  spec/cucumber/support_code/step_definition_snippet_builder_spec.js
  30. +1 −1  spec/cucumber/support_code/step_definition_spec.js
  31. +1 −1  spec/cucumber/support_code/world_constructor_spec.js
  32. +1 −1  spec/cucumber/type/collection_spec.js
  33. +2 −2 spec/cucumber/type/hash_data_table_spec.js
  34. +2 −2 spec/cucumber/util/arguments_spec.js
  35. +1 −1  spec/cucumber/util/reg_exp_spec.js
  36. +1 −1  spec/cucumber/volatile_configuration_spec.js
  37. +1 −1  spec/cucumber_spec.js
  38. +4 −2 spec/support/spec_helper.js
View
7 .travis.yml
@@ -2,6 +2,11 @@ rvm: "1.9.2"
before_script: "git submodule update --init && npm install"
script: "rake"
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
+
branches:
only:
- master
@@ -10,4 +15,4 @@ notifications:
email:
- jb@jbpros.com
irc:
- - "irc.freenode.org#cucumber.js"
+ - "irc.freenode.org#cucumber.js"
View
2  README.md
@@ -13,7 +13,7 @@ It still needs a lot of work. Only a few feature elements are supported at the m
### Works on
-* Node.js 0.4.7, 0.4.8, 0.5.0-pre
+* Node.js 0.4, 0.5, 0.6
* Google Chrome 13.0.772.0 (dev)
* Firefox 4.0.1
* Safari 5.0.5
View
2  package.json
@@ -20,7 +20,7 @@
}
, "directories" : { "lib" : "./lib" }
, "main" : "./lib/cucumber"
-, "engines" : { "node" : "0.4 || 0.5" }
+, "engines" : { "node" : "0.4 || 0.5 || 0.6" }
, "dependencies" :
{ "gherkin" : "2.5.1"
, "jasmine-node" : "1.0.9"
View
2  spec/cucumber/ast/background_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.Background", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var steps;
var background, keyword, name, description, line, lastStep;
View
2  spec/cucumber/ast/data_table/row_spec.js
@@ -1,7 +1,7 @@
require('../../../support/spec_helper');
describe("Cucumber.Ast.Feature", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var row, cells, line;
View
2  spec/cucumber/ast/data_table_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.DataTable", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var dataTable, rows;
View
2  spec/cucumber/ast/doc_string_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.DocString", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var docString, contents, line;
beforeEach(function() {
View
2  spec/cucumber/ast/feature_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.Feature", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var scenarioCollection, lastScenario;
var feature, keyword, name, line;
View
2  spec/cucumber/ast/features_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.Features", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var featureCollection, lastFeature;
var features;
View
2  spec/cucumber/ast/scenario_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.Scenario", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var steps;
var scenario, keyword, name, description, line, background, lastStep;
View
2  spec/cucumber/ast/step_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Ast.Step", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var step, keyword, name, line, previousStep;
var docString, dataTable;
View
2  spec/cucumber/cli/argument_parser/feature_path_expander_spec.js
@@ -1,7 +1,7 @@
require('../../../support/spec_helper');
describe("Cucumber.Cli.ArgumentParser.FeaturePathExpander", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var FeaturePathExpander = Cucumber.Cli.ArgumentParser.FeaturePathExpander;
var PathExpander = Cucumber.Cli.ArgumentParser.PathExpander;
View
2  spec/cucumber/cli/argument_parser/path_expander_spec.js
@@ -1,7 +1,7 @@
require('../../../support/spec_helper');
describe("Cucumber.Cli.ArgumentParser.PathExpander", function() {
- var PathExpander = require('cucumber').Cli.ArgumentParser.PathExpander;
+ var PathExpander = requireLib('cucumber').Cli.ArgumentParser.PathExpander;
describe("expandPathsWithRegexp", function() {
var _ = require('underscore');
View
2  spec/cucumber/cli/argument_parser/support_code_path_expander_spec.js
@@ -1,7 +1,7 @@
require('../../../support/spec_helper');
describe("Cucumber.Cli.ArgumentParser.SupportCodePathExpander", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var SupportCodePathExpander = Cucumber.Cli.ArgumentParser.SupportCodePathExpander;
var PathExpander = Cucumber.Cli.ArgumentParser.PathExpander;
View
4 spec/cucumber/cli/argument_parser_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Cli.ArgumentParser", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var path = require('path');
var nopt;
@@ -76,7 +76,7 @@ describe("Cucumber.Cli.ArgumentParser", function() {
});
describe("getFeatureFilePaths()", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var unexpandedFeaturePaths;
var expandedFeaturePaths;
View
2  spec/cucumber/cli/configuration_spec.js
@@ -2,7 +2,7 @@ require('../../support/spec_helper');
require('../../support/configurations_shared_examples.js');
describe("Cucumber.Cli.Configuration", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var argv, configuration;
var argumentParser;
View
2  spec/cucumber/cli/feature_source_loader_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Cli.FeatureSourceLoader", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var featureSourceLoader, featureFilePaths;
View
2  spec/cucumber/cli/support_code_loader_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Cli.SupportCodeLoader", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var fs = require('fs');
var supportCodeLoader, supportCodeFilePaths, primeSupportCodeFilePaths, secondarySupportCodeFilePaths;
View
2  spec/cucumber/cli_spec.js
@@ -1,7 +1,7 @@
require('../support/spec_helper');
describe("Cucumber.Cli", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var cli, argv;
View
2  spec/cucumber/listener/progress_formatter_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Listener.ProgressFormatter", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var listener, failedStepResults;
beforeEach(function() {
View
2  spec/cucumber/parser_spec.js
@@ -1,7 +1,7 @@
require('../support/spec_helper');
describe("Cucumber.Parser", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var parser, featureSources;
var features;
View
2  spec/cucumber/runtime/ast_tree_walker/event_spec.js
@@ -1,7 +1,7 @@
require('../../../support/spec_helper');
describe("Cucumber.Runtime.AstTreeWalker.Event", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
describe("non-instance method", function() {
});
View
2  spec/cucumber/runtime/ast_tree_walker_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Runtime.AstTreeWalker", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var treeWalker, features, supportCodeLibrary, listeners;
beforeEach(function() {
View
2  spec/cucumber/runtime/failed_step_result_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Runtime.FailedStepResult", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var stepResult, failureException;
beforeEach(function() {
View
2  spec/cucumber/runtime/pending_step_result_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Runtime.PendingStepResult", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var stepResult;
beforeEach(function() {
View
2  spec/cucumber/runtime/successful_step_result_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Runtime.SuccessfulStepResult", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var stepResult;
beforeEach(function() {
View
2  spec/cucumber/runtime_spec.js
@@ -1,7 +1,7 @@
require('../support/spec_helper');
describe("Cucumber.Runtime", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var configuration;
var runtime;
var supportCodeLibrary, listeners;
View
2  spec/cucumber/support_code/library_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.SupportCode.Library", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var library, rawSupportCode;
var stepDefinitionCollection;
var worldConstructor;
View
2  spec/cucumber/support_code/step_definition_snippet_builder_spec.js
@@ -2,7 +2,7 @@ require('../../support/spec_helper');
describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
var _s = require('underscore.string');
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var StepDefinitionSnippetBuilder = Cucumber.SupportCode.StepDefinitionSnippetBuilder;
var snippetBuilder, step;
View
2  spec/cucumber/support_code/step_definition_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.SupportCode.StepDefinition", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var stepDefinition, stepRegexp, stepDefinitionCode;
beforeEach(function() {
View
2  spec/cucumber/support_code/world_constructor_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.SupportCode.WorldConstructor", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
it("returns a function", function() {
worldConstructor = Cucumber.SupportCode.WorldConstructor();
View
2  spec/cucumber/type/collection_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Type.Collection", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var collection, itemArray;
beforeEach(function() {
View
4 spec/cucumber/type/hash_data_table_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Type.HashDataTable", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var hashDataTable, rawArray;
@@ -94,4 +94,4 @@ describe("Cucumber.Type.HashDataTable", function() {
expect(actual).toEqual(expected);
});
});
-});
+});
View
4 spec/cucumber/util/arguments_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Util.Arguments", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var argumentsObject, thisDuringSlice, argumentsArray;
beforeEach(function() {
@@ -22,4 +22,4 @@ describe("Cucumber.Util.Arguments", function() {
it("returns the array created by slice()", function() {
expect(Cucumber.Util.Arguments(argumentsObject)).toBe(argumentsArray);
});
-});
+});
View
2  spec/cucumber/util/reg_exp_spec.js
@@ -1,7 +1,7 @@
require('../../support/spec_helper');
describe("Cucumber.Util.RegExp", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
describe("escapeString()", function() {
var escapeString = Cucumber.Util.RegExp.escapeString;
View
2  spec/cucumber/volatile_configuration_spec.js
@@ -2,7 +2,7 @@ require('../support/spec_helper');
require('../support/configurations_shared_examples.js');
describe("Cucumber.VolatileConfiguration", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var featureSource, supportCodeInitializer, configuration;
var supportCodeLibrary;
View
2  spec/cucumber_spec.js
@@ -1,7 +1,7 @@
require('./support/spec_helper');
describe("Cucumber", function() {
- var Cucumber = require('cucumber');
+ var Cucumber = requireLib('cucumber');
var featureSource, supportCodeInitializer, configuration;
View
6 spec/support/spec_helper.js
@@ -1,5 +1,3 @@
-require.paths.unshift(__dirname + '/../../lib');
-
beforeEach(function() {
this.addMatchers({
toBeAFunction: function() { return typeof(this.actual) == 'function'; },
@@ -122,6 +120,10 @@ require.extensions['.js'] = function (obj, path) {
}
}
+requireLib = function(modulePath) {
+ return require('../../lib/' + modulePath);
+};
+
afterEach(function() {
for (var path in moduleSpies) {
delete moduleSpies[path];
Please sign in to comment.
Something went wrong with that request. Please try again.