Skip to content

Instantly share code, notes, and snippets.

@hustKiwi
Last active August 19, 2017 21:20
Show Gist options
  • Save hustKiwi/1f7232ef2bb103a1a96164374f5be463 to your computer and use it in GitHub Desktop.
Save hustKiwi/1f7232ef2bb103a1a96164374f5be463 to your computer and use it in GitHub Desktop.
module.exports = function () {
this.Given("the ATM has $cash", function (cash, done) {
this.ATM().cashAvailable(Number(cash), done);
});
this.When("the user asks the ATM for $cash", function (cash, done) {
this.ATM().requestCash(Number(cash), done);
});
this.Then("the user's account will have $cash",
function (cash, done) {
this.DB().accountFor(this.userId).then(function (user) {
expect(cash).to.be.eql(user.cash);
}).then(done, done);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment