[rubygem-rails-api] Fix test suite

Josef Stribny jstribny at fedoraproject.org
Thu Jun 19 07:44:09 UTC 2014


commit b4d102be95a70347921ae3b5d2fd307a2c0e15fb
Author: Josef Stribny <jstribny at redhat.com>
Date:   Thu Jun 19 09:44:02 2014 +0200

    Fix test suite

 rubygem-rails-api.spec |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/rubygem-rails-api.spec b/rubygem-rails-api.spec
index 370cfcc..511d8eb 100644
--- a/rubygem-rails-api.spec
+++ b/rubygem-rails-api.spec
@@ -2,7 +2,7 @@
 
 Name: rubygem-%{gem_name}
 Version: 0.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Rails for API only Applications
 Group: Development/Languages
 License: MIT
@@ -66,8 +66,10 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
 %check
 pushd .%{gem_instdir}
 sed -i '/require.*bundler/d' test/test_helper.rb
-#generators are omited because it generate application which use bundler
-testrb -v -Ilib -Itest test/api_application/*_test.rb test/api_controller/*_test.rb
+# Generators are omited because they generate application which use bundler
+# We need to require action_controller
+# See https://github.com/rails/rails/commit/53610e5140149aca3a15a27ef103350a5969f7aa
+ruby -Ilib -Itest -raction_controller -e "Dir.glob './test/api_{application,controller}/*_test.rb', &method(:require)"
 popd
 
 %files
@@ -85,6 +87,9 @@ popd
 %{gem_instdir}/test
 
 %changelog
+* Thu Jun 19 2014 Josef Stribny <jstribny at redhat.com> - 0.2.1-3
+- Fix tests
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list