Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify prints an unpleasant stack trace on failure #414

Closed
williammartin opened this issue Dec 19, 2017 · 0 comments · Fixed by #415
Closed

Specify prints an unpleasant stack trace on failure #414

williammartin opened this issue Dec 19, 2017 · 0 comments · Fixed by #415
Labels

Comments

@williammartin
Copy link
Collaborator

Specify("doesn't print the right stack trace", func() {
	Fail("fail the test")
})

->

Users/pivotal/go/src/github.com/williammartin/ginkgoleaktest/ginkgoleaktest_test.go:8
  doesn't print the right stack trace [It]
  /Users/pivotal/go/src/github.com/onsi/ginkgo/ginkgo_dsl.go:394

  fail the test

  /Users/pivotal/go/src/github.com/williammartin/ginkgoleaktest/ginkgoleaktest_test.go:11

This line:

/Users/pivotal/go/src/github.com/onsi/ginkgo/ginkgo_dsl.go:394

is pretty useless, and I think it's because Specify( calls It( which sets a codelocation of 1, not pruning the stack correctly:

https://github.com/onsi/ginkgo/blob/master/ginkgo_dsl.go#L365
https://github.com/onsi/ginkgo/blob/master/ginkgo_dsl.go#L339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant