update to 1.0.5
(cherry picked from commit 949fcc062fff1c80211db7d049dc2fd9150d37b8)
This commit is contained in:
parent
3a597aef05
commit
f93afc9712
Binary file not shown.
BIN
rails-controller-testing-1.0.5.gem
Normal file
BIN
rails-controller-testing-1.0.5.gem
Normal file
Binary file not shown.
BIN
rubygem-rails-controller-testing-1.0.5-5.oe1.src.cpio
Normal file
BIN
rubygem-rails-controller-testing-1.0.5-5.oe1.src.cpio
Normal file
Binary file not shown.
63
rubygem-rails-controller-testing-rails6.patch
Normal file
63
rubygem-rails-controller-testing-rails6.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From 23e9befe7e5747ab648e8558ccd76a5b229e452b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Tue, 9 Feb 2021 11:59:38 +0100
|
||||
Subject: [PATCH] Disable relative template test cases
|
||||
|
||||
Relative templates are not supported since Rails 6.1:
|
||||
|
||||
https://travis-ci.org/github/rails/rails-controller-testing/jobs/705868237
|
||||
|
||||
Fixes #64
|
||||
---
|
||||
test/controllers/template_assertions_test.rb | 8 ++++++--
|
||||
test/integration/template_assertions_test.rb | 4 ++++
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/controllers/template_assertions_test.rb b/test/controllers/template_assertions_test.rb
|
||||
index d1a6fa3..1e18c91 100644
|
||||
--- a/test/controllers/template_assertions_test.rb
|
||||
+++ b/test/controllers/template_assertions_test.rb
|
||||
@@ -13,6 +13,8 @@ def test_with_partial
|
||||
end
|
||||
|
||||
def test_file_with_relative_path_success
|
||||
+ skip "Deprecated in ActionPack 6.1+" if ActionPack.version >= Gem::Version.new('6.1')
|
||||
+
|
||||
get :render_file_relative_path
|
||||
assert_template file: 'README.rdoc'
|
||||
end
|
||||
@@ -179,8 +181,10 @@ def test_assert_template_reset_between_requests
|
||||
get :render_nothing
|
||||
assert_template layout: nil
|
||||
|
||||
- get :render_file_relative_path
|
||||
- assert_template file: 'README.rdoc'
|
||||
+ if ActionPack.version < Gem::Version.new('6.1')
|
||||
+ get :render_file_relative_path
|
||||
+ assert_template file: 'README.rdoc'
|
||||
+ end
|
||||
|
||||
get :render_nothing
|
||||
assert_template file: nil
|
||||
diff --git a/test/integration/template_assertions_test.rb b/test/integration/template_assertions_test.rb
|
||||
index 0924016..381687b 100644
|
||||
--- a/test/integration/template_assertions_test.rb
|
||||
+++ b/test/integration/template_assertions_test.rb
|
||||
@@ -26,6 +26,8 @@ def test_layout_reset_between_requests
|
||||
end
|
||||
|
||||
def test_file_reset_between_requests
|
||||
+ skip "Deprecated in ActionPack 6.1+" if ActionPack.version >= Gem::Version.new('6.1')
|
||||
+
|
||||
get '/template_assertions/render_file_relative_path'
|
||||
assert_template file: 'README.rdoc'
|
||||
|
||||
@@ -64,6 +66,8 @@ def test_layout_reset_between_requests_when_opening_a_session
|
||||
end
|
||||
|
||||
def test_file_reset_between_requests_when_opening_a_session
|
||||
+ skip "Deprecated in ActionPack 6.1+" if ActionPack.version >= Gem::Version.new('6.1')
|
||||
+
|
||||
open_session do |session|
|
||||
session.get '/template_assertions/render_file_relative_path'
|
||||
session.assert_template file: 'README.rdoc'
|
||||
@ -1,14 +1,18 @@
|
||||
%global gem_name rails-controller-testing
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.0.2
|
||||
Version: 1.0.5
|
||||
Release: 1
|
||||
Summary: Extracting `assigns` and `assert_template` from ActionDispatch
|
||||
License: MIT
|
||||
URL: https://github.com/rails/rails-controller-testing
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Patch0: %{name}-rails6.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: rubygems-devel rubygem(railties) => 5.0.1 rubygem(railties) < 6
|
||||
BuildRequires: rubygem(sqlite3)
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
BuildRequires: ruby >= 2.2.2
|
||||
BuildRequires: rubygem(railties) >= 5.0.1
|
||||
%description
|
||||
This gem brings back assigns to your controller tests as well as
|
||||
assert_template to both controller and integration tests.
|
||||
@ -21,13 +25,11 @@ Requires: %{name} = %{version}-%{release}
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
%setup -q -D -T -n %{gem_name}-%{version}
|
||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
sed -i '/^Bundler/d' test/dummy/config/application.rb
|
||||
%setup -q -n %{gem_name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
gem build %{gem_name}.gemspec
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
@ -37,7 +39,9 @@ cp -a .%{gem_dir}/* \
|
||||
|
||||
%check
|
||||
pushd .%{gem_instdir}
|
||||
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
# kill the bundler
|
||||
sed -i '/^Bundler/ s/^/#/' test/dummy/config/application.rb
|
||||
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
popd
|
||||
|
||||
%files
|
||||
@ -54,5 +58,8 @@ popd
|
||||
%{gem_instdir}/Rakefile
|
||||
|
||||
%changelog
|
||||
* Thur Mar 3 2022 liqiuyu <liqiuyu@kylinos.cn> - 1.0.5-1
|
||||
- update to 1.0.5
|
||||
|
||||
* Thu Aug 20 2020 luoshengwei <luoshengwei@huawei.com> - 1.0.2-1
|
||||
- package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user