goblin: github.com/franela/goblin Index | Files

package goblin

import "github.com/franela/goblin"

Index

Package Files

assertions.go goblin.go mono_reporter.go reporting.go resolver.go

func ResolveStack Uses

func ResolveStack(skip int) []string

type Assertion Uses

type Assertion struct {
    // contains filtered or unexported fields
}

Assertion represents a fact stated about a source object. It contains the source object and function to call

func (*Assertion) Eql Uses

func (a *Assertion) Eql(dst interface{})

Eql is a shorthand alias of Equal for convenience

func (*Assertion) Equal Uses

func (a *Assertion) Equal(dst interface{})

Equal takes a destination object and asserts that a source object and destination object are equal to one another. It will fail the assertion and print a corresponding message if the objects are not equivalent.

func (*Assertion) IsFalse Uses

func (a *Assertion) IsFalse(messages ...string)

IsFalse asserts that a source is equal to false. Optional messages can be provided for inclusion in the displayed message if the assertion fails. It will fail the assertion if the source does not resolve to false.

func (*Assertion) IsTrue Uses

func (a *Assertion) IsTrue(messages ...string)

IsTrue asserts that a source is equal to true. Optional messages can be provided for inclusion in the displayed message if the assertion fails. It will fail the assertion if the source does not resolve to true.

type Describe Uses

type Describe struct {
    // contains filtered or unexported fields
}

type DetailedReporter Uses

type DetailedReporter struct {
    // contains filtered or unexported fields
}

func (*DetailedReporter) Begin Uses

func (r *DetailedReporter) Begin()

func (*DetailedReporter) BeginDescribe Uses

func (r *DetailedReporter) BeginDescribe(name string)

func (*DetailedReporter) End Uses

func (r *DetailedReporter) End()

func (*DetailedReporter) EndDescribe Uses

func (r *DetailedReporter) EndDescribe()

func (*DetailedReporter) Failure Uses

func (r *DetailedReporter) Failure(failure *Failure)

func (*DetailedReporter) ItFailed Uses

func (r *DetailedReporter) ItFailed(name string)

func (*DetailedReporter) ItIsExcluded Uses

func (r *DetailedReporter) ItIsExcluded(name string)

func (*DetailedReporter) ItIsPending Uses

func (r *DetailedReporter) ItIsPending(name string)

func (*DetailedReporter) ItPassed Uses

func (r *DetailedReporter) ItPassed(name string)

func (*DetailedReporter) ItTook Uses

func (r *DetailedReporter) ItTook(duration time.Duration)

func (*DetailedReporter) SetTextFancier Uses

func (r *DetailedReporter) SetTextFancier(f TextFancier)

type Done Uses

type Done func(error ...interface{})

type Failure Uses

type Failure struct {
    Stack    []string
    TestName string
    Message  string
}

type G Uses

type G struct {
    // contains filtered or unexported fields
}

func Goblin Uses

func Goblin(t *testing.T, arguments ...string) *G

func (*G) After Uses

func (g *G) After(h func())

func (*G) AfterEach Uses

func (g *G) AfterEach(h func())

func (*G) Assert Uses

func (g *G) Assert(src interface{}) *Assertion

func (*G) Before Uses

func (g *G) Before(h func())

func (*G) BeforeEach Uses

func (g *G) BeforeEach(h func())

func (*G) Describe Uses

func (g *G) Describe(name string, h func())

func (*G) Fail Uses

func (g *G) Fail(error interface{})

func (*G) It Uses

func (g *G) It(name string, h ...interface{})

func (*G) JustBeforeEach Uses

func (g *G) JustBeforeEach(h func())

func (*G) SetReporter Uses

func (g *G) SetReporter(r Reporter)

func (*G) Timeout Uses

func (g *G) Timeout(time time.Duration)

func (*G) Xit Uses

func (g *G) Xit(name string, h ...interface{})

type It Uses

type It struct {
    // contains filtered or unexported fields
}

type Itable Uses

type Itable interface {
    // contains filtered or unexported methods
}

type Monochrome Uses

type Monochrome struct {
}

func (*Monochrome) Cyan Uses

func (self *Monochrome) Cyan(text string) string

func (*Monochrome) Gray Uses

func (self *Monochrome) Gray(text string) string

func (*Monochrome) Green Uses

func (self *Monochrome) Green(text string) string

func (*Monochrome) Red Uses

func (self *Monochrome) Red(text string) string

func (*Monochrome) WithCheck Uses

func (self *Monochrome) WithCheck(text string) string

func (*Monochrome) Yellow Uses

func (self *Monochrome) Yellow(text string) string

type Reporter Uses

type Reporter interface {
    BeginDescribe(string)
    EndDescribe()
    Begin()
    End()
    Failure(*Failure)
    ItTook(time.Duration)
    ItFailed(string)
    ItPassed(string)
    ItIsPending(string)
    ItIsExcluded(string)
}

type Runnable Uses

type Runnable interface {
    // contains filtered or unexported methods
}

type TerminalFancier Uses

type TerminalFancier struct {
}

func (*TerminalFancier) Cyan Uses

func (self *TerminalFancier) Cyan(text string) string

func (*TerminalFancier) Gray Uses

func (self *TerminalFancier) Gray(text string) string

func (*TerminalFancier) Green Uses

func (self *TerminalFancier) Green(text string) string

func (*TerminalFancier) Red Uses

func (self *TerminalFancier) Red(text string) string

func (*TerminalFancier) WithCheck Uses

func (self *TerminalFancier) WithCheck(text string) string

func (*TerminalFancier) Yellow Uses

func (self *TerminalFancier) Yellow(text string) string

type TextFancier Uses

type TextFancier interface {
    Red(text string) string
    Gray(text string) string
    Cyan(text string) string
    Green(text string) string
    Yellow(text string) string
    WithCheck(text string) string
}

type Xit Uses

type Xit struct {
    // contains filtered or unexported fields
}

Package goblin imports 11 packages (graph). Updated 2019-03-13. Refresh now. Tools for package owners.