Skip to content

Instantly share code, notes, and snippets.

@nelstrom
Created October 27, 2014 10:30
Show Gist options
  • Save nelstrom/2b103d186e9c681f65fb to your computer and use it in GitHub Desktop.
Save nelstrom/2b103d186e9c681f65fb to your computer and use it in GitHub Desktop.
Given-When-Then test style proposal
feature('foo bar', {
given: function() {
visit('/');
},
when: function() {
fillIn('#some-field', 'foo');
click('button:contains("Submit")');
},
then: function() {
expectContent('Error BAZ');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment