Extract outputStub into testing.go
This commit is contained in:
parent
f6fcdf114e
commit
8ee97d72cd
2 changed files with 14 additions and 12 deletions
|
|
@ -89,18 +89,6 @@ func TestPRView(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
type outputStub struct {
|
||||
contents []byte
|
||||
}
|
||||
|
||||
func (s outputStub) Output() ([]byte, error) {
|
||||
return s.contents, nil
|
||||
}
|
||||
|
||||
func (s outputStub) Run() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestPRView_NoActiveBranch(t *testing.T) {
|
||||
initBlankContext("OWNER/REPO", "master")
|
||||
http := initFakeHTTP()
|
||||
|
|
|
|||
14
command/testing.go
Normal file
14
command/testing.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package command
|
||||
|
||||
// outputStub implements a simple utils.Runnable
|
||||
type outputStub struct {
|
||||
output []byte
|
||||
}
|
||||
|
||||
func (s outputStub) Output() ([]byte, error) {
|
||||
return s.output, nil
|
||||
}
|
||||
|
||||
func (s outputStub) Run() error {
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue