Fix RSpec 3.9 compatibility to fix FTBFS (rhbz#1800030).

f38
Vít Ondruch 5 years ago
parent 0b20f2185f
commit 3714b55268

@ -1,33 +0,0 @@
From e28d273df0c75a16278bd959d46c6489b035860e Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Tue, 12 Sep 2017 23:19:25 +0200
Subject: [PATCH] Fixnum to integer
---
spec/rspec/its_spec.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/rspec/its_spec.rb b/spec/rspec/its_spec.rb
index 91eed5f..83788f6 100644
--- a/spec/rspec/its_spec.rb
+++ b/spec/rspec/its_spec.rb
@@ -55,7 +55,7 @@ module RSpec
end
its("name") { should eq("John") }
its("name.size") { should eq(4) }
- its("name.size.class") { should eq(Fixnum) }
+ its("name.size.class") { should eq(Integer) }
context "using should_not" do
its("name") { should_not eq("Paul") }
@@ -86,7 +86,7 @@ module RSpec
end
its([:a]) { should eq("Symbol: a") }
its(['a']) { should eq("String: a") }
- its([:b, 'c', 4]) { should eq("Symbol: b; String: c; Fixnum: 4") }
+ its([:b, 'c', 4]) { should eq("Symbol: b; String: c; Integer: 4") }
its(:name) { should eq("George") }
context "when referring to an attribute that doesn't exist" do
context "it raises an error" do
--
1.8.3.1

@ -0,0 +1,42 @@
From 96b8b55805c93ef6eb941af9fc612ce8a23ace07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 7 Feb 2020 12:36:48 +0100
Subject: [PATCH] Bump to RSpec 3.9.
The one test failure was caused by change in RSpec 3.9:
https://github.com/rspec/rspec-expectations/pull/1080
---
Gemfile | 2 +-
features/its.feature | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Gemfile b/Gemfile
index b1c4141..3215060 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
gemspec
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
- branch = ENV.fetch('BRANCH','3-1-maintenance')
+ branch = ENV.fetch('BRANCH','3-9-maintenance')
library_path = File.expand_path("../../#{lib}", __FILE__)
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
gem lib, :path => library_path
diff --git a/features/its.feature b/features/its.feature
index 4d9c661..19329b6 100644
--- a/features/its.feature
+++ b/features/its.feature
@@ -28,7 +28,7 @@ Feature: attribute of subject
Person
with one phone number (555-1212)
phone_numbers.first
- should eq "555-1212"
+ is expected to eq "555-1212"
"""
Scenario: specify value of an attribute of a hash
--
2.25.0

@ -2,11 +2,14 @@
Name: rubygem-%{gem_name}
Version: 1.3.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Provides "its" method formerly part of rspec-core
License: MIT
URL: https://github.com/rspec/rspec-its
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Fix RSpec 3.9 compatibility.
# https://github.com/rspec/rspec-its/pull/75
Patch0: rubygem-rspec-its-1.3.0-Bump-to-RSpec-3.9.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
@ -29,6 +32,8 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%patch0 -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
@ -66,6 +71,9 @@ popd
%{gem_instdir}/%{gem_name}.gemspec
%changelog
* Fri Feb 07 2020 Vít Ondruch <vondruch@redhat.com> - 1.3.0-3
- Fix RSpec 3.9 compatibility to fix FTBFS (rhbz#1800030).
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

Loading…
Cancel
Save