github.com/lenfree/buffalo@v0.7.3-0.20170207163156-891616ea4064/buffalo/cmd/test.go (about)

     1  package cmd
     2  
     3  import (
     4  	"os"
     5  
     6  	tt "github.com/markbates/tt/cmd"
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  var testCmd = &cobra.Command{
    11  	Use:                "test",
    12  	Short:              "Runs the tests for your Buffalo app",
    13  	DisableFlagParsing: true,
    14  	Run: func(c *cobra.Command, args []string) {
    15  		os.Setenv("GO_ENV", "test")
    16  		tt.Run(tt.GoBuilder(args))
    17  	},
    18  }
    19  
    20  func init() {
    21  	RootCmd.AddCommand(testCmd)
    22  }