示例#1
0
文件: main.go 项目: gshilin/shidur-go
func main() {

	app := config.NewApp(".")

	routes.Setup(app)
	app.Negroni.Run(":" + os.Getenv("PORT"))
}
示例#2
0
import (
	"github.com/gshilin/shidur-go/config"
	"github.com/joho/godotenv"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"testing"
)

var (
	app *config.App
)

func TestTest(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Test Suite")
}

var _ = BeforeSuite(func() {

	// Load test ENV variables
	godotenv.Load("../.env.test")

	// Create a new app
	app = config.NewApp("../.")
})

var _ = BeforeEach(func() {
	// Reset the DB before every test
	app.DB.Exec("DELETE FROM messages;")
})