Skip to content

Instantly share code, notes, and snippets.

@RiverGlide
Created February 11, 2016 10:42
Show Gist options
  • Save RiverGlide/8b6c33e962e1791c640c to your computer and use it in GitHub Desktop.
Save RiverGlide/8b6c33e962e1791c640c to your computer and use it in GitHub Desktop.
@Before
public void ourUsersCanBrowseTheWeb() {
james.can(BrowseTheWeb.with(hisBrowser));
jane.can(BrowseTheWeb.with(herBrowser));
}
@Test
public void should_not_affect_todos_belonging_to_another_user() {
givenThat(james).wasAbleTo(Start.withATodoListContaining(“Walk the dog”, “Put out the garbage”));
andThat(jane).wasAbleTo(Start.withATodoListContaining(“Walk the dog”, “Feed the cat”));
when(james).attemptsTo(
CompleteItem.called(“Walk the dog”),
Clear.completedItems()
);
then(jane).should(seeThat(TheItems.displayed(), contains(“Walk the dog”, “Feed the cat”)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment