spec/middleware_spec.rb in pdfkit-0.4.4 vs spec/middleware_spec.rb in pdfkit-0.4.5

- old
+ new

@@ -7,12 +7,12 @@ @pdf = PDFKit::Middleware.new({}) @env = {'REQUEST_URI' => 'http://example.com/document.pdf', 'rack.url_scheme' => 'http', 'HTTP_HOST' => 'example.com'} end it "should correctly parse relative url with single quotes" do - @body = %{<html><head><link href='/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src='/test.png' /></body></html>} + @body = %{<html><head><link href='/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src="/test.png" /></body></html>} body = @pdf.send :translate_paths, @body, @env - body.should == "<html><head><link href=\"http://example.com/stylesheets/application.css\" media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src=\"http://example.com/test.png\" /></body></html>" + body.should == "<html><head><link href='http://example.com/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src=\"http://example.com/test.png\" /></body></html>" end it "should correctly parse relative url with double quotes" do @body = %{<link href="/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />} body = @pdf.send :translate_paths, @body, @env