Created
October 19, 2012 06:34
-
-
Save sankargorthi/3916558 to your computer and use it in GitHub Desktop.
support/hooks.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hooks = function() { | |
var browser = require("browser.js"); | |
this.Before(function(callback) { | |
console.log('hello'); | |
callback(); | |
}); | |
this.After(function(callback) { | |
console.log('test complete'); | |
callback(); | |
}); | |
}; | |
module.exports = hooks; |
This file goes under
features
|
-----support
|---------- world.js
|---------- hooks.js
-----step_definitions
|---------- <step_definitions files>
I was trying to write a batch/shell script that would take an argument to look something like this:
./test.sh features/folder/specific_feature.feature
and that would take care of requiring all the step_definitions and support files. So, the script uses a --require to load the step_definitions. Is this the right way to do it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks good. Where do you put that file and how do you invoke Cucumber?