File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 8888 expect ( redirector . redirect_url ( @site , page_with_one ) ) . to start_with ( "http://example.github.io/test" )
8989 end
9090
91+ it "converts non-string values in site.github.url to strings" do
92+ @site . config [ 'github' ] = { "url" => TestStringContainer . new ( "http://example.github.io/test" ) }
93+ expect ( redirector . redirect_url ( @site , page_with_one ) ) . to start_with ( "http://example.github.io/test" )
94+ end
95+
9196 it "uses site.baseurl as the redirect prefix when site.github.url is not set" do
9297 @site . config [ 'baseurl' ] = "/fancy/prefix"
9398 expect ( redirector . redirect_url ( @site , page_with_one ) ) . to start_with ( "/fancy/prefix" )
Original file line number Diff line number Diff line change @@ -79,3 +79,13 @@ def destination_sitemap
7979 File . read ( File . join ( @dest . to_s , 'sitemap.xml' ) )
8080 end
8181end
82+
83+ class TestStringContainer
84+ def initialize ( strValue )
85+ @val = strValue
86+ end
87+
88+ def to_s
89+ @val
90+ end
91+ end
You can’t perform that action at this time.
0 commit comments