diff options
author | spf13 <steve.francia@gmail.com> | 2015-05-20 02:21:21 -0400 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2015-05-20 02:21:21 -0400 |
commit | a584ff207b4ee951e4b25cf5cedf6d261ee1bc47 (patch) | |
tree | 4273e35cfd90493ed0d25d53450285b61c527418 /hugolib/rss_test.go | |
parent | 599d1b9786ddbaa9203aaca2c96ab33b40a583b1 (diff) |
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
Diffstat (limited to 'hugolib/rss_test.go')
-rw-r--r-- | hugolib/rss_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/rss_test.go b/hugolib/rss_test.go index 2b48f10aa..90429d32f 100644 --- a/hugolib/rss_test.go +++ b/hugolib/rss_test.go @@ -33,10 +33,12 @@ const RSS_TEMPLATE = `<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom </rss>` func TestRSSOutput(t *testing.T) { + viper.Reset() + defer viper.Reset() + rssUri := "customrss.xml" viper.Set("baseurl", "http://auth/bub/") viper.Set("RSSUri", rssUri) - defer viper.Set("RSSUri", "index.xml") hugofs.DestinationFS = new(afero.MemMapFs) s := &Site{ @@ -44,6 +46,7 @@ func TestRSSOutput(t *testing.T) { } s.initializeSiteInfo() s.prepTemplates() + // Add an rss.xml template to invoke the rss build. s.addTemplate("rss.xml", RSS_TEMPLATE) |