diff --git a/rails-controller-testing-1.0.2.gem b/rails-controller-testing-1.0.2.gem deleted file mode 100644 index 8a11c27846ffe8338c93acb42d268e4119cc22a3..0000000000000000000000000000000000000000 Binary files a/rails-controller-testing-1.0.2.gem and /dev/null differ diff --git a/rails-controller-testing-1.0.5.gem b/rails-controller-testing-1.0.5.gem new file mode 100644 index 0000000000000000000000000000000000000000..870b8085cd53f24c3b7f64e0d72bc3f5e808fe11 Binary files /dev/null and b/rails-controller-testing-1.0.5.gem differ diff --git a/rubygem-rails-controller-testing-1.0.5-5.oe1.src.cpio b/rubygem-rails-controller-testing-1.0.5-5.oe1.src.cpio new file mode 100644 index 0000000000000000000000000000000000000000..19482b1a31e64a91c56d37d7f33428189b517a3d Binary files /dev/null and b/rubygem-rails-controller-testing-1.0.5-5.oe1.src.cpio differ diff --git a/rubygem-rails-controller-testing-rails6.patch b/rubygem-rails-controller-testing-rails6.patch new file mode 100644 index 0000000000000000000000000000000000000000..3364ee00cd6c7df6924a99c1605996d3d58e85dc --- /dev/null +++ b/rubygem-rails-controller-testing-rails6.patch @@ -0,0 +1,63 @@ +From 23e9befe7e5747ab648e8558ccd76a5b229e452b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +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' diff --git a/rubygem-rails-controller-testing.spec b/rubygem-rails-controller-testing.spec index fcfb5f34a8b98beaa61b147b501ac6bd4e7f538a..c456ba399b559beb81d1a3d2b2339ab9176afb0a 100644 --- a/rubygem-rails-controller-testing.spec +++ b/rubygem-rails-controller-testing.spec @@ -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 - 1.0.5-1 +- update to 1.0.5 + * Thu Aug 20 2020 luoshengwei - 1.0.2-1 - package init