diff --git a/Makefile b/Makefile index 11ba124a..c4400ec9 100644 --- a/Makefile +++ b/Makefile @@ -34,10 +34,11 @@ compile: cd source && $(GOPATH)/bin/rice embed-go $(GOPATH)/bin/wt compile source/scss/base.scss -b source/css -test: clean compile test-env - gocov test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -covermode=count > coverage.json +test: clean compile + go test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out + gocov convert coverage.out > coverage.json -test-all: compile test-env databases +test-all: compile databases $(GOTEST) ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out -v coverage: diff --git a/cmd/cli_test.go b/cmd/cli_test.go index 6e292f61..0af5ee34 100644 --- a/cmd/cli_test.go +++ b/cmd/cli_test.go @@ -47,8 +47,8 @@ func TestVersionCLI(t *testing.T) { func TestAssetsCLI(t *testing.T) { run := CatchCLI([]string{"statup", "assets"}) assert.Nil(t, run) - assert.FileExists(t, "../assets/css/base.css") - assert.FileExists(t, "../assets/scss/base.scss") + assert.FileExists(t, dir+"/assets/css/base.css") + assert.FileExists(t, dir+"/assets/scss/base.scss") } func TestSassCLI(t *testing.T) { @@ -57,7 +57,7 @@ func TestSassCLI(t *testing.T) { } run := CatchCLI([]string{"statup", "sass"}) assert.Nil(t, run) - assert.FileExists(t, "../assets/css/base.css") + assert.FileExists(t, dir+"/assets/css/base.css") } func TestUpdateCLI(t *testing.T) { diff --git a/source/source.go b/source/source.go index dca799b1..a14eda72 100644 --- a/source/source.go +++ b/source/source.go @@ -31,7 +31,7 @@ func Assets() { func CompileSASS(folder string) error { sassBin := os.Getenv("SASS") if sassBin == "" { - return errors.New("missing the SASS executable environment variable") + sassBin = "sass" } scssFile := fmt.Sprintf("%v/%v", folder, "assets/scss/base.scss")