Documentation ¶
Index ¶
- func Desc(t *testing.T, desc string, wrapper func(It))
- func Equal(a, b interface{}) bool
- func Exist(a, b interface{}) bool
- func NotEqual(a, b interface{}) bool
- func NotExist(a, b interface{}) bool
- func Setup(before, after func()) func(fn func(Expect)) func(Expect)
- type Expect
- type Expectation
- type It
- type Matcher
- type Test
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Expect ¶
type Expect func(val interface{}) *Expectation
type Expectation ¶
type Expectation struct { Output formatter Value interface{} }
func (*Expectation) To ¶
func (self *Expectation) To(desc string, match Matcher, value interface{})
Example ¶
divisibleBy := func(a, b interface{}) bool { return a.(int)%b.(int) == 0 } expect(9).To("be divisible by", divisibleBy, 3)
Output:
func (*Expectation) ToEqual ¶
func (self *Expectation) ToEqual(b interface{})
func (*Expectation) ToExist ¶
func (self *Expectation) ToExist()
func (*Expectation) ToNotEqual ¶
func (self *Expectation) ToNotEqual(b interface{})
func (*Expectation) ToNotExist ¶
func (self *Expectation) ToNotExist()
type Test ¶
func (*Test) PrintError ¶
func (*Test) PrintFailingLine ¶
func (test *Test) PrintFailingLine(failingLine *failingLine)
func (*Test) PrintTitle ¶
func (test *Test) PrintTitle()
Click to show internal directories.
Click to hide internal directories.