change include uri test to use non-https URI

This commit is contained in:
Dan Allen 2013-09-22 18:11:29 -06:00
parent ceeaf60583
commit 6354126026
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
diff --git a/test/reader_test.rb b/test/reader_test.rb
index abc708a..6eb08ef 100644
--- a/test/reader_test.rb
+++ b/test/reader_test.rb
@@ -502,12 +502,12 @@ include::fixtures/no-such-file.ad[]
test 'include macro can retrieve data from uri' do
input = <<-EOS
....
-include::https://raw.github.com/asciidoctor/asciidoctor/master/LICENSE[]
+include::http://asciidoctor.org/humans.txt[]
....
EOS
output = render_embedded_string input, :safe => :safe, :attributes => {'allow-uri-read' => ''}
- assert_match(/MIT/, output)
+ assert_match(/Asciidoctor/, output)
end
test 'inaccessible uri referenced by include macro does not crash processor' do

View File

@ -9,6 +9,7 @@ Group: Development/Languages
License: MIT
URL: http://github.com/asciidoctor/asciidoctor
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: asciidoctor-fix-include-uri.patch
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
Requires: ruby(release)
BuildRequires: ruby(release)
@ -49,6 +50,7 @@ Documentation for %{name}
gem unpack -V %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1
%build
gem build %{gem_name}.gemspec