#1 Enable tests.
Merged 4 years ago by jaruga. Opened 6 years ago by jaruga.
rpms/ jaruga/rubygem-multi_test feature/enable-tests  into  master

file modified
+24 -4
@@ -2,7 +2,7 @@ 

  

  Name: rubygem-%{gem_name}

  Version: 0.1.2

- Release: 7%{?dist}

+ Release: 8%{?dist}

  Summary: Wafter-thin gem to disable autorun of various testing libraries

  License: MIT

  URL: http://cukes.info
@@ -10,6 +10,11 @@ 

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby

+ # Each unit tests depends on the condition of installed

+ # of minitest, rspec and test-unit

+ # Run tests for one condition (minitest only is installed).

+ BuildRequires: rubygem(activesupport)

+ BuildRequires: rubygem(minitest)

  BuildArch: noarch

  

  %description
@@ -45,9 +50,21 @@ 

  

  %check

  pushd .%{gem_instdir}

- # Unfortunatelly tests depend heavily on Bundler

- # and testing different versions of gems

- #. test/all

+ # Disable the test depends on bundler.

+ mv test/scenarios/bundler_require.rb{,.disabled}

+ # Disable the test for rspec

+ mv test/scenarios/rspec_matchers.rb{,.disabled}

+ mv test/scenarios/spec_matchers.rb{,.disabled}

+ # Disable the test for test-unit

+ mv test/scenarios/require_test_unit.rb{,.disabled}

+ mv test/scenarios/test_unit_assertions.rb{,.disabled}

+ 

+ ruby -Ilib <<EOR

+   Dir.glob "./test/scenarios/*.rb" do |filename|

+     puts "Testing file: #{filename}"

+     require filename

+   end

+ EOR

  popd

  

  %files
@@ -69,6 +86,9 @@ 

  %{gem_instdir}/test

  

  %changelog

+ * Mon Nov 25 2019 Jun Aruga <jaruga@redhat.com> - 0.1.2-8

+ - Enable tests.

+ 

  * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-7

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

I sent a patch to enable unit tests for this rubygem-multi_test.spec
https://bugzilla.redhat.com/show_bug.cgi?id=1418692

Now we can send pull-request here and merge by ourselves.
So, I want to ask someone to review my PR.
This PR is based on uploaded patch file on above Bugzilla page.

I did below tests today.

Let's wait for Active Support 5.2.

@pvalena Do we have to wait Active Support 5.2?
Why do you think so?

Because it (Build)Requires Active Support; and currently its tested against:

DEBUG util.py:439:   rubygem-activesupport        noarch      1:5.1.5-3.fc29       build      275 k

And it should ideally build with Rails 5.2 to avoid additional rebuilds. You can, however, submit it to COPR with Rails 5.2 to make sure it builds fine.

Sure, I will wait Rails 5.2 will be released.

I can see now the situation for Rails is changed after 1 year.

Feel free to build it if it works for you.

rebased onto 34d4abb

4 years ago

Pull-Request has been merged by jaruga

4 years ago