Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Jun Aruga
c5126e01b6 Fix test suite for Ruby 2.3 compatibility. (rhbz#1308100) 2016-05-26 15:35:17 +02:00
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,23 @@
From afbcbc18efbf56ae81842094c78ac6ad218e9922 Mon Sep 17 00:00:00 2001
From: Loren Segal <lsegal@soen.ca>
Date: Thu, 14 Apr 2016 23:52:09 -0700
Subject: [PATCH] Fix brittle test on Ruby 2.3
Fixes #927
---
spec/parser/ruby/ruby_parser_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/parser/ruby/ruby_parser_spec.rb b/spec/parser/ruby/ruby_parser_spec.rb
index 6e5bd89..07d7212 100644
--- a/spec/parser/ruby/ruby_parser_spec.rb
+++ b/spec/parser/ruby/ruby_parser_spec.rb
@@ -351,7 +351,7 @@ eof
# end comment
end
eof
- comment = ast.first.last.first
+ comment = ast.first.last.jump(:comment)
comment.type.should == :comment
comment.docstring_hash_flag.should be_true
comment.docstring.strip.should == "comment here"

View file

@ -2,7 +2,7 @@
Name: rubygem-%{gem_name}
Version: 0.8.7.6
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Documentation tool for consistent and usable documentation in Ruby
Group: Development/Languages
License: MIT and (BSD or Ruby)
@ -17,6 +17,10 @@ BuildRequires: rubygem(redcarpet)
BuildRequires: rubygem(rack)
BuildArch: noarch
# Fix test suite in Ruby 2.3.
# https://github.com/lsegal/yard/commit/afbcbc1.patch
Patch0: rubygem-yard-0.8.7.6-fix-test-for-ruby-2.3.patch
%description
YARD is a documentation generation tool for the Ruby programming language.
It enables the user to generate consistent, usable documentation that can be
@ -56,6 +60,7 @@ pushd .%{gem_instdir}
# provides more recent RSpec :/
sed -i '/File\.stub(:exist?).with(\/\\\.yardopts$\/)/ i\ File.stub(:exist?).and_return(true)' spec/cli/server_spec.rb
patch -p1 < %{PATCH0}
rspec2 spec
popd
@ -88,6 +93,9 @@ popd
%changelog
* Wed May 25 2016 Jun Aruga <jaruga@redhat.com> - 0.8.7.6-3
- Fix test suite for Ruby 2.3 compatibility. (rhbz#1308100)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild