Skip to content

Instantly share code, notes, and snippets.

@mguillermin
Created March 2, 2012 20:20
Show Gist options
  • Save mguillermin/1961019 to your computer and use it in GitHub Desktop.
Save mguillermin/1961019 to your computer and use it in GitHub Desktop.
public class BaseModelTest {
public static FakeApplication app;
@BeforeClass
public static void startApp() {
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
Helpers.start(app);
}
@AfterClass
public static void stopApp() {
Helpers.stop(app);
}
}
public class CompanyTest extends BaseModelTest {
@Test
public void save() {
Company company = new Company("My Company");
company.save();
assertThat(company.id).isNotNull();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment