top
(README.md)
# Gospel
BDD-style testing library for Golang.

## Install
```
go get github.com/r7kamura/gospel
```

## Usage
```go
package main

import (
	. "github.com/r7kamura/gospel"
	"testing"
)

func TestDescribe(t *testing.T) {
	Describe(t, "Expectation#To", func() {
		Context("with Equal", func() {
			It("evaluates actual == expected", func() {
				Expect(1).To(Equal, 1)
			})
		})

		Context("with NotEqual", func() {
			Before(func() {
				// Called before each examples in this Context.
			})

			After(func() {
				// Called after each examples in this Context.
			})

			It("evaluates actual != expected", func() {
				Expect(1).To(NotEqual, 2)
			})
		})

		Context("with Exist", func() {
			It("evaluates actual != nil", func() {
				Expect(1).To(Exist)
			})
		})

		Context("with NotExist", func() {
			It("evaluates actual == nil", func() {
				Expect(nil).To(NotExist)
			})
		})
	})
}
```

```
$ go test
```

![](http://dl.dropboxusercontent.com//u/5978869/image/20131003_083821.png)

```
$ go test -v
```

![](http://dl.dropboxusercontent.com//u/5978869/image/20131006_224123.png)

Imported only in test by 35 package(s) ΒΆ

  1. github.com/135yshr/go_gospel
  2. github.com/135yshr/scratch2hue
  3. github.com/135yshr/scratchgo
  4. github.com/135yshr/t_zungo/lib
  5. github.com/135yshr/umarugo/lib
  6. github.com/135yshr/wspacego/lib
  7. github.com/6br/go_alignment/src
  8. github.com/6br/goem/goem
  9. github.com/a16/fake-rtrd
  10. github.com/bose999/GoSendMail
  11. github.com/d2g/unqlitego
  12. github.com/hiboma/procstat/pidstat
  13. github.com/hiboma/suexec
  14. github.com/jondot/delta
  15. github.com/kalashnikov/go-hoedown
  16. github.com/kentaro/delta
  17. github.com/kentaro/go-hoedown
  18. github.com/kitak/delta
  19. github.com/masayukioguni/bcd
  20. github.com/masayukioguni/winformat
  21. github.com/mazgi-sandbox/gohelloworld
  22. github.com/nobonobo/unqlitego
  23. github.com/patyx7/unqlitego
  24. github.com/pepabo/triglav-agent
  25. github.com/qube81/hellonewpkg
  26. github.com/r7kamura/router
  27. github.com/r7kamura/sugoi
  28. github.com/robmccoll/unqlitego
  29. github.com/suin/goevent
  30. github.com/suin/ioreplacer
  31. github.com/tddbc-sendai/go_gospel
  32. github.com/tddbc/go_gospel
  33. github.com/yagince/poker-face/poker
  34. github.com/yosssi/gohelloworld
  35. github.com/yuokada/delta