Skip to content

Instantly share code, notes, and snippets.

@ipolevoy
Created May 8, 2015 19:36
Show Gist options
  • Save ipolevoy/0e3616defbd1d180500a to your computer and use it in GitHub Desktop.
Save ipolevoy/0e3616defbd1d180500a to your computer and use it in GitHub Desktop.
@Test
public void shouldFindPerson(){
//create data in DB
Person.createId("first_name", "John", "last_name", "Doe");
Person.createId("first_name", "Jane", "last_name", "Doe");
//perform tests that need data:
List<Person> people = Person.where("first_name = ?", "John");
the(people.size()).shouldBe(1);
a(people.get(0).get("last_name")).shouldBe("Doe");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment