Skip to content

Commit

Permalink
Updates to tests to reflect changes from example.com (#33)
Browse files Browse the repository at this point in the history
* Updates to test to reflect changes from example.com

* Update to README for contributions section
  • Loading branch information
seborama authored Oct 20, 2018
1 parent 21f9fe9 commit a20ea7b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DEPS:=$$(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
MAINFILES=$$(go list -f '{{join .GoFiles " "}}')

deps:
go get -d -v ./... $(DEPS)
go get -d -t -v ./... $(DEPS)

test: deps
go test -cover -race -parallel 2 ./ ./issues/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,9 @@ Objects cannot be created by name at runtime in Go. Rather than re-create the or
In practice, the implications for you depend on how much you care about the error type. If all you need to know is that an error occurred, you won't mind this limitation.

Mitigation: Support for common errors (network down) has been implemented. Support for more error types can be implemented, if there is appetite for it.

## Contribute

You are welcome to submit a PR to contribute.

Please follow a TDD workflow: tests must be present and avoid toxic DDT (dev driven testing).
5 changes: 2 additions & 3 deletions govcr_example1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package govcr_test
import (
"fmt"
"io/ioutil"

"strings"

"github.com/seborama/govcr"
Expand Down Expand Up @@ -40,6 +39,6 @@ func Example_number1SimpleVCR() {
runTestEx1()

// Output:
// 404 text/html true {TracksLoaded:0 TracksRecorded:1 TracksPlayed:0}
// 404 text/html true {TracksLoaded:1 TracksRecorded:0 TracksPlayed:1}
// 404 text/html; charset=UTF-8 true {TracksLoaded:0 TracksRecorded:1 TracksPlayed:0}
// 404 text/html; charset=UTF-8 true {TracksLoaded:1 TracksRecorded:0 TracksPlayed:1}
}
4 changes: 2 additions & 2 deletions govcr_example2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ func Example_number2CustomClientVCR1() {
runTestEx2(app)

// Output:
// 404 text/html true - 404 text/html true - {TracksLoaded:0 TracksRecorded:2 TracksPlayed:0}
// 404 text/html true - 404 text/html true - {TracksLoaded:2 TracksRecorded:0 TracksPlayed:2}
// 404 text/html; charset=UTF-8 true - 404 text/html; charset=UTF-8 true - {TracksLoaded:0 TracksRecorded:2 TracksPlayed:0}
// 404 text/html; charset=UTF-8 true - 404 text/html; charset=UTF-8 true - {TracksLoaded:2 TracksRecorded:0 TracksPlayed:2}
}
7 changes: 3 additions & 4 deletions govcr_example3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"fmt"
"io/ioutil"
"net/http"
"time"

"strings"
"time"

"github.com/seborama/govcr"
)
Expand Down Expand Up @@ -66,6 +65,6 @@ func Example_number3HeaderExclusionVCR() {
runTestEx4()

// Output:
// 404 text/html true 404 text/html true 404 text/html true 404 text/html true {TracksLoaded:0 TracksRecorded:4 TracksPlayed:0}
// 404 text/html true 404 text/html true 404 text/html true 404 text/html true {TracksLoaded:4 TracksRecorded:0 TracksPlayed:4}
// 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true {TracksLoaded:0 TracksRecorded:4 TracksPlayed:0}
// 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true 404 text/html; charset=UTF-8 true {TracksLoaded:4 TracksRecorded:0 TracksPlayed:4}
}

0 comments on commit a20ea7b

Please sign in to comment.