Refactor factory.Executable() to be a method rather than a func
This way, factory can satisfy an interface that requires `Executable()`.
This commit is contained in:
parent
38eb894d73
commit
3cce16e72d
4 changed files with 63 additions and 64 deletions
|
|
@ -147,8 +147,7 @@ func Test_NewCmdLogin(t *testing.T) {
|
|||
t.Run(tt.name, func(t *testing.T) {
|
||||
io, stdin, _, _ := iostreams.Test()
|
||||
f := &cmdutil.Factory{
|
||||
IOStreams: io,
|
||||
Executable: func() string { return "/path/to/gh" },
|
||||
IOStreams: io,
|
||||
}
|
||||
|
||||
io.SetStdoutTTY(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue