Skip to content

Commit

Permalink
#20 make tests black-boxed.
Browse files Browse the repository at this point in the history
  • Loading branch information
petr-korobeinikov committed Feb 20, 2021
1 parent d3bcc0e commit 24bbc8a
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 8 deletions.
4 changes: 3 additions & 1 deletion internal/args_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package internal
package internal_test

import (
"fmt"
"testing"

. "scm/internal"
)

func TestParseArgs(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion internal/cfg_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package internal
package internal_test

import (
"os"
"reflect"
"testing"

. "scm/internal"
)

func TestReadCfg(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion internal/clone_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package internal
package internal_test

import (
"os"
"testing"

. "scm/internal"
)

func TestPrepareLocalWorkingCopyPath(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion internal/homedir_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package internal
package internal_test

import (
"os"
"testing"

. "scm/internal"
)

func TestExpandHomeDir(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion internal/lookup_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package internal
package internal_test

import (
"os"
"testing"

. "scm/internal"
)

func TestLookupEnvOrDefault(t *testing.T) {
Expand Down
8 changes: 6 additions & 2 deletions internal/postcmd_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package internal
package internal_test

import "testing"
import (
"testing"

. "scm/internal"
)

func TestExecutePostCmd(t *testing.T) {
t.Run(`positive`, func(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion internal/scmurl_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package internal
package internal_test

import (
"fmt"
"testing"

. "scm/internal"
)

func TestExtractLocalPathFromScmURL(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"log"
"os"

. "scm/internal"
)

Expand Down

0 comments on commit 24bbc8a

Please sign in to comment.