@@ -57,7 +57,7 @@ var _ = ginkgo.Describe("log", func() {
57
57
}()
58
58
})
59
59
ginkgo .It ("asserts" , func () {
60
- gomega . Expect (false ). To ( gomega . Equal ( true ) , "false is never true" )
60
+ framework . ExpectEqual (false , true , "false is never true" )
61
61
})
62
62
ginkgo .It ("error" , func () {
63
63
err := errors .New ("an error with a long, useless description" )
@@ -68,7 +68,7 @@ var _ = ginkgo.Describe("log", func() {
68
68
})
69
69
ginkgo .AfterEach (func () {
70
70
framework .Logf ("after" )
71
- gomega . Expect (true ). To ( gomega . Equal ( false ) , "true is never false either" )
71
+ framework . ExpectEqual (true , false , "true is never false either" )
72
72
})
73
73
})
74
74
@@ -83,7 +83,6 @@ func TestFailureOutput(t *testing.T) {
83
83
runTests (fakeT , reporter )
84
84
85
85
// Now check the output.
86
- g := gomega .NewGomegaWithT (t )
87
86
actual := normalizeReport (* reporter )
88
87
89
88
// output from AfterEach
@@ -117,16 +116,16 @@ func TestFailureOutput(t *testing.T) {
117
116
},
118
117
}
119
118
// Compare individual fields. Comparing the slices leads to unreadable error output when there is any mismatch.
120
- g . Expect (len (actual )). To ( gomega . Equal ( len (expected ) ), "%d entries in %v" , len (expected ), actual )
119
+ framework . ExpectEqual (len (actual ), len (expected ), "%d entries in %v" , len (expected ), actual )
121
120
for i , a := range actual {
122
121
b := expected [i ]
123
- g . Expect (a .name ). To ( gomega . Equal ( b .name ) , "name in %d" , i )
124
- g . Expect (a .output ). To ( gomega . Equal ( b .output ) , "output in %d" , i )
125
- g . Expect (a .failure ). To ( gomega . Equal ( b .failure ) , "failure in %d" , i )
122
+ framework . ExpectEqual (a .name , b .name , "name in %d" , i )
123
+ framework . ExpectEqual (a .output , b .output , "output in %d" , i )
124
+ framework . ExpectEqual (a .failure , b .failure , "failure in %d" , i )
126
125
// There may be additional stack entries from the "testing" package at the
127
126
// end. We ignore those in the comparison because the line number in them
128
127
// varies.
129
- g . Expect (a .stack ). To ( gomega . Equal ( b .stack ) , "stack in %d: %s" , i , a .stack )
128
+ framework . ExpectEqual (a .stack , b .stack , "stack in %d: %s" , i , a .stack )
130
129
}
131
130
}
132
131
0 commit comments