Documentation ¶
Index ¶
- Variables
- func After(filter string, fn func())
- func AfterAll(fn func())
- func AfterMulti(filters []string, fn func())
- func And(match string, fn interface{})
- func Before(filter string, fn func())
- func BeforeAll(fn func())
- func BeforeMulti(filters []string, fn func())
- func BuildAndRunDir(dir string, filters []string) error
- func BuildAndRunDirWithGoBuildTags(dir string, filters []string, goBuildTags string) error
- func Execute(t Tester, line string, arg string) (bool, error)
- func Given(match string, fn interface{})
- func RunMain()
- func Then(match string, fn interface{})
- func When(match string, fn interface{})
- type Context
- func (c *Context) After(filter string, fn func())
- func (c *Context) AfterAll(fn func())
- func (c *Context) AfterMulti(filters []string, fn func())
- func (c *Context) And(match string, fn interface{})
- func (c *Context) Before(filter string, fn func())
- func (c *Context) BeforeAll(fn func())
- func (c *Context) BeforeMulti(filters []string, fn func())
- func (c *Context) Execute(t Tester, line string, arg string) (bool, error)
- func (c *Context) Given(match string, fn interface{})
- func (c *Context) RunDir(dir string) (*Runner, error)
- func (c *Context) RunFiles(featureFiles []string) (*Runner, error)
- func (c *Context) Then(match string, fn interface{})
- func (c *Context) When(match string, fn interface{})
- type Runner
- type RunnerResult
- type StepDefinition
- type TestError
- type Tester
- type TestingT
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GlobalContext = Context{ Steps: []StepDefinition{}, World: map[string]interface{}{}, BeforeFilters: map[string]func(){}, AfterFilters: map[string]func(){}, Filters: []string{}, } T Tester World = GlobalContext.World )
Functions ¶
func AfterMulti ¶
func AfterMulti(filters []string, fn func())
func BeforeMulti ¶
func BeforeMulti(filters []string, fn func())
func BuildAndRunDir ¶
BuildAndRunDir builds the given director's features into Go Code. Using the filters provided. An error is returned if the build fails.
func BuildAndRunDirWithGoBuildTags ¶
BuildAndRunDirWithGoBuildTags builds the given director's features into Go Code using the filters provided. Also takes a string for the build tags to be passed to the go command. An error is returned if the build fails.
If goBuildTags is empty, the param will be ignored.
Types ¶
type Context ¶
type Context struct { Filters []string World map[string]interface{} BeforeFilters map[string]func() AfterFilters map[string]func() BeforeAllFilter func() AfterAllFilter func() Steps []StepDefinition T Tester }
func (*Context) AfterMulti ¶
func (*Context) BeforeMulti ¶
type Runner ¶
type Runner struct { *Context Features []*gherkin.Feature Results []RunnerResult Unmatched []*gherkin.Step FailCount int SkipCount int }
func (*Runner) MissingMatcherStubs ¶
type StepDefinition ¶
func (*StepDefinition) CallIfMatch ¶
type Tester ¶
type Tester interface { Errorf(format string, args ...interface{}) Skip(args ...interface{}) }
Click to show internal directories.
Click to hide internal directories.