package config

import (
	"github.com/ghthor/gospec"
	. "github.com/ghthor/gospec"
	"testing"
)

func TestSpecs(t *testing.T) {
	r := gospec.NewRunner()

	r.AddSpec(DescribeConfigLoading)

	gospec.MainGoTest(r, t)
}

func DescribeConfigLoading(c gospec.Context) {
	c.Specify("Config can be parsed from json file", func() {
		expectedConfig := Config{
			"a/path/to/a/git/directory",
		}

		config, err := ReadFromFile("config.example.json")
		c.Assume(err, IsNil)
		c.Expect(config, Equals, expectedConfig)
	})
}

package config

import (
	"github.com/ghthor/gospec"
	. "github.com/ghthor/gospec"
	"testing"
)

func TestUnitSpecs(t *testing.T) {
	r := gospec.NewRunner()

	r.AddSpec(DescribeConfigLoading)

	gospec.MainGoTest(r, t)
}

func DescribeConfigLoading(c gospec.Context) {
	c.Specify("Config can be parsed from json file", func() {
		expectedConfig := Config{
			"a/path/to/a/git/directory",
		}

		config, err := ReadFromFile("config.example.json")
		c.Assume(err, IsNil)
		c.Expect(config, Equals, expectedConfig)
	})
}

--- 
+++ 
@@ -6,7 +6,7 @@
 	"testing"
 )
 
-func TestUnitSpecs(t *testing.T) {
+func TestSpecs(t *testing.T) {
 	r := gospec.NewRunner()
 
 	r.AddSpec(DescribeConfigLoading)
Change the name the test's are closer to integration
| But they are both unit+integration cause the package is so simple
