zen: github.com/pranavraja/zen Index | Examples | Files

package zen

import "github.com/pranavraja/zen"

Index

Examples

Package Files

bdd.go formatter.go matchers.go

func Desc Uses

func Desc(t *testing.T, desc string, wrapper func(It))

func Equal Uses

func Equal(a, b interface{}) bool

func Exist Uses

func Exist(a, b interface{}) bool

func NotEqual Uses

func NotEqual(a, b interface{}) bool

func NotExist Uses

func NotExist(a, b interface{}) bool

func Setup Uses

func Setup(before, after func()) func(fn func(Expect)) func(Expect)

type Expect Uses

type Expect func(val interface{}) *Expectation

type Expectation Uses

type Expectation struct {
    Output formatter
    Value  interface{}
}

func (*Expectation) To Uses

func (self *Expectation) To(desc string, match Matcher, value interface{})

Code:

divisibleBy := func(a, b interface{}) bool {
    return a.(int)%b.(int) == 0
}
expect(9).To("be divisible by", divisibleBy, 3)

func (*Expectation) ToEqual Uses

func (self *Expectation) ToEqual(b interface{})

func (*Expectation) ToExist Uses

func (self *Expectation) ToExist()

func (*Expectation) ToNotEqual Uses

func (self *Expectation) ToNotEqual(b interface{})

func (*Expectation) ToNotExist Uses

func (self *Expectation) ToNotExist()

type It Uses

type It func(title string, fn func(Expect))

type Matcher Uses

type Matcher func(a, b interface{}) bool

type Test Uses

type Test struct {
    T     *testing.T
    Title string
    Fn    func(Expect)
}

func (*Test) PrintError Uses

func (test *Test) PrintError(message string)

func (*Test) PrintFailingLine Uses

func (test *Test) PrintFailingLine(failingLine *failingLine)

func (*Test) PrintTitle Uses

func (test *Test) PrintTitle()

func (*Test) Run Uses

func (test *Test) Run()

Package zen imports 6 packages (graph). Updated 2016-07-14. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).