Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Created August 7, 2014 14:02
Show Gist options
  • Save yoshuawuyts/b5a13c04f7f53d3a6eed to your computer and use it in GitHub Desktop.
Save yoshuawuyts/b5a13c04f7f53d3a6eed to your computer and use it in GitHub Desktop.
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));
});
/**
* 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