Merge remote-tracking branch 'upstream/master' into discord
Этот коммит содержится в:
коммит
09be91ff9a
4 изменённых файлов: 18 добавлений и 16 удалений
|
@ -22,6 +22,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Find/Replaced references to DATA-DOG/godog -> cucumber/godog for docs. ([smikulcik])
|
||||||
|
|
||||||
## [0.8.0]
|
## [0.8.0]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,6 +1,6 @@
|
||||||
[](https://circleci.com/gh/cucumber/godog/tree/master)
|
[](https://circleci.com/gh/cucumber/godog/tree/master)
|
||||||
[](https://godoc.org/github.com/DATA-DOG/godog)
|
[](https://godoc.org/github.com/cucumber/godog)
|
||||||
[](https://codecov.io/github/DATA-DOG/godog)
|
[](https://codecov.io/github/cucumber/godog)
|
||||||
|
|
||||||
# Godog
|
# Godog
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
Please read all the README, you may find it very useful. And do not forget
|
Please read all the README, you may find it very useful. And do not forget
|
||||||
to peek into the
|
to peek into the
|
||||||
[CHANGELOG](https://github.com/DATA-DOG/godog/blob/master/CHANGELOG.md)
|
[CHANGELOG](https://github.com/cucumber/godog/blob/master/CHANGELOG.md)
|
||||||
from time to time.
|
from time to time.
|
||||||
|
|
||||||
Package godog is the official Cucumber BDD framework for Golang, it merges
|
Package godog is the official Cucumber BDD framework for Golang, it merges
|
||||||
|
@ -64,7 +64,7 @@ themselves from costly regressions.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
go get github.com/DATA-DOG/godog/cmd/godog
|
go get github.com/cucumber/godog/cmd/godog
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ undefined:
|
||||||
If we wish to vendor godog dependency, we can do it as usual, using tools
|
If we wish to vendor godog dependency, we can do it as usual, using tools
|
||||||
you prefer:
|
you prefer:
|
||||||
|
|
||||||
git clone https://github.com/DATA-DOG/godog.git $GOPATH/src/godogs/vendor/github.com/DATA-DOG/godog
|
git clone https://github.com/cucumber/godog.git $GOPATH/src/godogs/vendor/github.com/cucumber/godog
|
||||||
|
|
||||||
It gives you undefined step snippets to implement in your test context.
|
It gives you undefined step snippets to implement in your test context.
|
||||||
You may copy these snippets into your `godogs_test.go` file.
|
You may copy these snippets into your `godogs_test.go` file.
|
||||||
|
@ -153,7 +153,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/DATA-DOG/godog"
|
"github.com/cucumber/godog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func thereAreGodogs(available int) error {
|
func thereAreGodogs(available int) error {
|
||||||
|
@ -213,7 +213,7 @@ composed.
|
||||||
image](https://github.com/myie/cucumber-html-reporter) for usage
|
image](https://github.com/myie/cucumber-html-reporter) for usage
|
||||||
details.
|
details.
|
||||||
- [how to use godog by semaphoreci](https://semaphoreci.com/community/tutorials/how-to-use-godog-for-behavior-driven-development-in-go)
|
- [how to use godog by semaphoreci](https://semaphoreci.com/community/tutorials/how-to-use-godog-for-behavior-driven-development-in-go)
|
||||||
- see [examples](https://github.com/DATA-DOG/godog/tree/master/examples)
|
- see [examples](https://github.com/cucumber/godog/tree/master/examples)
|
||||||
- see extension [AssistDog](https://github.com/hellomd/assistdog), which
|
- see extension [AssistDog](https://github.com/hellomd/assistdog), which
|
||||||
may have useful **gherkin.DataTable** transformations or comparison
|
may have useful **gherkin.DataTable** transformations or comparison
|
||||||
methods for assertions.
|
methods for assertions.
|
||||||
|
@ -380,7 +380,7 @@ Join [here](https://cucumberbdd-slack-invite.herokuapp.com/).
|
||||||
**Gherkin** is licensed under the [MIT][license] and developed as
|
**Gherkin** is licensed under the [MIT][license] and developed as
|
||||||
a part of the [cucumber project][cucumber]
|
a part of the [cucumber project][cucumber]
|
||||||
|
|
||||||
[godoc]: http://godoc.org/github.com/DATA-DOG/godog "Documentation on godoc"
|
[godoc]: http://godoc.org/github.com/cucumber/godog "Documentation on godoc"
|
||||||
[golang]: https://golang.org/ "GO programming language"
|
[golang]: https://golang.org/ "GO programming language"
|
||||||
[behat]: http://docs.behat.org/ "Behavior driven development framework for PHP"
|
[behat]: http://docs.behat.org/ "Behavior driven development framework for PHP"
|
||||||
[cucumber]: https://cucumber.io/ "Behavior driven development framework"
|
[cucumber]: https://cucumber.io/ "Behavior driven development framework"
|
||||||
|
|
|
@ -44,7 +44,7 @@ Now we have described a success case and an error when the request method is not
|
||||||
Run **godog version.feature**. You should see the following result, which says that all of our
|
Run **godog version.feature**. You should see the following result, which says that all of our
|
||||||
steps are yet undefined and provide us with the snippets to implement them.
|
steps are yet undefined and provide us with the snippets to implement them.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Step 3
|
### Step 3
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ need to store state within steps (a response), we should introduce a structure w
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/DATA-DOG/godog"
|
"github.com/cucumber/godog"
|
||||||
"github.com/DATA-DOG/godog/gherkin"
|
"github.com/cucumber/godog/gherkin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiFeature struct {
|
type apiFeature struct {
|
||||||
|
@ -98,8 +98,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
|
||||||
"github.com/DATA-DOG/godog"
|
"github.com/cucumber/godog"
|
||||||
"github.com/DATA-DOG/godog/gherkin"
|
"github.com/cucumber/godog/gherkin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiFeature struct {
|
type apiFeature struct {
|
||||||
|
@ -192,7 +192,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/DATA-DOG/godog"
|
"github.com/cucumber/godog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getVersion(w http.ResponseWriter, r *http.Request) {
|
func getVersion(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -253,7 +253,7 @@ used to respond with the correct constant version number.
|
||||||
|
|
||||||
Run our tests to see whether everything is happening as we have expected: `godog version.feature`
|
Run our tests to see whether everything is happening as we have expected: `godog version.feature`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Conclusions
|
### Conclusions
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# An example of API with DB
|
# An example of API with DB
|
||||||
|
|
||||||
The following example demonstrates steps how we describe and test our API with DB using **godog**.
|
The following example demonstrates steps how we describe and test our API with DB using **godog**.
|
||||||
To start with, see [API example](https://github.com/DATA-DOG/godog/tree/master/examples/api) before.
|
To start with, see [API example](https://github.com/cucumber/godog/tree/master/examples/api) before.
|
||||||
We have extended it to be used with database.
|
We have extended it to be used with database.
|
||||||
|
|
||||||
The interesting point is, that we have [go-txdb](https://github.com/DATA-DOG/go-txdb) library,
|
The interesting point is, that we have [go-txdb](https://github.com/DATA-DOG/go-txdb) library,
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче