-
-
Save neilrees/b4a2e1acd6194e7fe8b5 to your computer and use it in GitHub Desktop.
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
Feature: Google Demo | |
Scenario: Google home page | |
When I open http://google.com | |
The the title should be Google |
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
module.exports.install = function (library) { | |
library | |
.when("I open $URL", function(url) { | |
this.browser.url(url) | |
}) | |
.then("the title should be $TITLE", function(title){ | |
this.browser.assert.title(title) | |
}) | |
}; |
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 Yadda = require('yadda'); | |
var library = Yadda.localisation.English.library(); | |
var featureParser = new Yadda.parsers.FeatureFileParser(); | |
require('./steps').install(library); | |
var yadda = new Yadda.Yadda(library); | |
new Yadda.FeatureFileSearch('./features').each(function(file) { | |
featureParser.parse(file).scenarios.forEach(function (scenario) { | |
module.exports[scenario.title] = function (browser) { | |
yadda.yadda(scenario.steps, { browser: browser }); | |
browser.end(); | |
}; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment