moved MatchYAML to the gomega/matchers.go
diff --git a/matchers.go b/matchers.go
index 12d2b96..0c30aa1 100644
--- a/matchers.go
+++ b/matchers.go
@@ -214,6 +214,15 @@
}
}
+//MatchYAML succeeds if actual is a string or stringer of YAML that matches
+//the expected YAML. The YAML's are decoded and the resulting objects are compared via
+//reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter.
+func MatchYAML(yaml interface{}) types.GomegaMatcher {
+ return &matchers.MatchYAMLMatcher{
+ YAMLToMatch: yaml,
+ }
+}
+
//BeEmpty succeeds if actual is empty. Actual must be of type string, array, map, chan, or slice.
func BeEmpty() types.GomegaMatcher {
return &matchers.BeEmptyMatcher{}
diff --git a/matchers/match_yaml_matcher.go b/matchers/match_yaml_matcher.go
index f8d881a..69fb51a 100644
--- a/matchers/match_yaml_matcher.go
+++ b/matchers/match_yaml_matcher.go
@@ -9,12 +9,6 @@
"gopkg.in/yaml.v2"
)
-func MatchYAML(yaml interface{}) *MatchYAMLMatcher {
- return &MatchYAMLMatcher{
- YAMLToMatch: yaml,
- }
-}
-
type MatchYAMLMatcher struct {
YAMLToMatch interface{}
}