session.Wait now emits the correct line number when failures occur
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea269ca..a33a96c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,9 @@
- `ghttp` can now handle concurrent requests.
- Added `Succeed` which allows one to write `Ω(MyFunction()).Should(Succeed())`.
+Bug Fixes:
+- gexec: `session.Wait` now uses `EventuallyWithOffset` to get the right line number in the failure.
+
## 1.0 (8/2/2014)
No changes. Dropping "beta" from the version number.
diff --git a/gexec/session.go b/gexec/session.go
index 460cfe5..46e7122 100644
--- a/gexec/session.go
+++ b/gexec/session.go
@@ -137,7 +137,7 @@
Wait uses eventually under the hood and accepts the same timeout/polling intervals that eventually does.
*/
func (s *Session) Wait(timeout ...interface{}) *Session {
- Eventually(s, timeout...).Should(Exit())
+ EventuallyWithOffset(1, s, timeout...).Should(Exit())
return s
}
diff --git a/gexec/session_test.go b/gexec/session_test.go
index cd48e6f..13cc3cd 100644
--- a/gexec/session_test.go
+++ b/gexec/session_test.go
@@ -4,6 +4,7 @@
"os/exec"
"syscall"
"time"
+
. "github.com/onsi/gomega/gbytes"
. "github.com/onsi/gomega/gexec"