From d81c752daab2f43c3ac43dad1b75de996512ad71 Mon Sep 17 00:00:00 2001 From: Antonio Pagano <645522+paganotoni@users.noreply.github.com> Date: Sun, 1 Dec 2019 08:31:16 -0500 Subject: [PATCH] Uses ModelSuite for generated model tests (#489) --- genny/model/_fixtures/models/widget_test.go | 4 ++-- genny/model/templates/-path-/-name-_test.go.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genny/model/_fixtures/models/widget_test.go b/genny/model/_fixtures/models/widget_test.go index db4dc90f..76bdc07d 100644 --- a/genny/model/_fixtures/models/widget_test.go +++ b/genny/model/_fixtures/models/widget_test.go @@ -2,6 +2,6 @@ package models import "testing" -func Test_Widget(t *testing.T) { - t.Fatal("This test needs to be implemented!") +func (ms *ModelSuite) Test_Widget() { + ms.Fail("This test needs to be implemented!") } diff --git a/genny/model/templates/-path-/-name-_test.go.tmpl b/genny/model/templates/-path-/-name-_test.go.tmpl index b194df6b..d3b0518f 100644 --- a/genny/model/templates/-path-/-name-_test.go.tmpl +++ b/genny/model/templates/-path-/-name-_test.go.tmpl @@ -2,6 +2,6 @@ package {{.opts.TestPackage}} import "testing" -func Test_{{.model.Name.Proper}}(t *testing.T) { - t.Fatal("This test needs to be implemented!") +func (ms *ModelSuite) Test_{{.model.Name.Proper}}() { + ms.Fail("This test needs to be implemented!") }