Created
August 7, 2014 14:02
-
-
Save yoshuawuyts/b5a13c04f7f53d3a6eed to your computer and use it in GitHub Desktop.
This file contains 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
given(/^I am on the Cucumber.js GitHub repository$/, function(done) { | |
this.visit('http://github.com/cucumber/cucumber-js', done); | |
}); | |
when(/^I go to the README file$/, function(done) { | |
done.pending(); | |
}); | |
then(/^I should see "(.*)" as the page title$/, function(title, done) { | |
if (title === this.browser.text('title')) done(); | |
else done.fail(new Error("Expected to be on page with title " + title)); | |
}); |
This file contains 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 dependencies. | |
*/ | |
var zombie = require('zombie'); | |
/** | |
* Setup world env. | |
*/ | |
module.exports = function (done) { | |
this.browser = new zombie(); | |
this.visit = function(url, done) { | |
this.browser.visit(url, done); | |
}; | |
done(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment