mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-20 22:25:09 +00:00
Merge pull request #15 from anonx/enh/testsuite-extracted
Import path of testsuite has been updated
This commit is contained in:
@@ -322,6 +322,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"github.com/revel/revel"{{range $k, $v := $.ImportPaths}}
|
"github.com/revel/revel"{{range $k, $v := $.ImportPaths}}
|
||||||
{{$v}} "{{$k}}"{{end}}
|
{{$v}} "{{$k}}"{{end}}
|
||||||
|
"github.com/revel/revel/testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -360,7 +361,7 @@ func main() {
|
|||||||
{{$line}}: "{{$key}}",{{end}}
|
{{$line}}: "{{$key}}",{{end}}
|
||||||
},{{end}}
|
},{{end}}
|
||||||
}
|
}
|
||||||
revel.TestSuites = []interface{}{ {{range .TestSuites}}
|
testing.TestSuites = []interface{}{ {{range .TestSuites}}
|
||||||
(*{{index $.ImportPaths .ImportPath}}.{{.StructName}})(nil),{{end}}
|
(*{{index $.ImportPaths .ImportPath}}.{{.StructName}})(nil),{{end}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -681,7 +681,7 @@ func (s *SourceInfo) ControllerSpecs() []*TypeInfo {
|
|||||||
|
|
||||||
func (s *SourceInfo) TestSuites() []*TypeInfo {
|
func (s *SourceInfo) TestSuites() []*TypeInfo {
|
||||||
if s.testSuites == nil {
|
if s.testSuites == nil {
|
||||||
s.testSuites = s.TypesThatEmbed(revel.REVEL_IMPORT_PATH + ".TestSuite")
|
s.testSuites = s.TypesThatEmbed(revel.REVEL_IMPORT_PATH + "/testing.TestSuite")
|
||||||
}
|
}
|
||||||
return s.testSuites
|
return s.testSuites
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user