Merge pull request #4409 from alfredxing/fix-test-stdout
Merge pull request 4409
This commit is contained in:
		
						commit
						0b32252506
					
				|  | @ -465,6 +465,14 @@ class TestSite < JekyllUnitTest | ||||||
|         @site = Site.new(site_configuration('profile' => true)) |         @site = Site.new(site_configuration('profile' => true)) | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|  |       # Suppress output while testing | ||||||
|  |       setup do | ||||||
|  |         $stdout = StringIO.new | ||||||
|  |       end | ||||||
|  |       teardown do | ||||||
|  |         $stdout = STDOUT | ||||||
|  |       end | ||||||
|  | 
 | ||||||
|       should "print profile table" do |       should "print profile table" do | ||||||
|         expect(@site.liquid_renderer).to receive(:stats_table) |         expect(@site.liquid_renderer).to receive(:stats_table) | ||||||
|         @site.process |         @site.process | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue