Skip to content

Commit

Permalink
correctly assert the test, remove debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
joefitzgerald committed Apr 1, 2021
1 parent d9a55e0 commit c4a3f39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 4 additions & 4 deletions command/runner_internals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func testRegexp(t *testing.T, when spec.G, it spec.S) {
{
input: "//counterfeiter:generate . Intf",
matches: true,
args: []string{".", "Intf"},
args: []string{"counterfeiter", ".", "Intf"},
},
{
input: "//go:generate stringer -type=Enum",
input: "//go:generate stringer -type=Enum",
matches: false,
},
}
Expand All @@ -55,8 +55,8 @@ func testRegexp(t *testing.T, when spec.G, it spec.S) {
for _, c := range cases {
result, ok := matchForString(c.input)
if c.matches {
Expect(ok).To(BeTrue())
Expect(result).To(ConsistOf(c.args))
Expect(ok).To(BeTrue(), c.input)
Expect(result).To(ConsistOf(c.args), c.input)
} else {
Expect(ok).To(BeFalse())
}
Expand Down
5 changes: 0 additions & 5 deletions generator/generator_internals_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package generator

import (
"fmt"
"io/ioutil"
"log"
"runtime"
Expand Down Expand Up @@ -60,10 +59,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) {
Expect(f.Name).To(Equal("FakeFileInfo"))
Expect(f.Mode).To(Equal(InterfaceOrFunction))
Expect(f.DestinationPackage).To(Equal("osfakes"))
fmt.Println("!!!")
fmt.Println(runtime.Version())
fmt.Println(runtime.Version()[0:6])
fmt.Println("!!!")
switch runtime.Version()[0:6] {
case "go1.15", "go1.14":
Expect(f.Imports).To(BeEquivalentTo(Imports{
Expand Down

0 comments on commit c4a3f39

Please sign in to comment.