|
|
6f58083 |
# Generated from shoulda-matchers-2.6.1.gem by gem2rpm -*- rpm-spec -*-
|
|
|
6f58083 |
%global gem_name shoulda-matchers
|
|
|
6f58083 |
|
|
|
6f58083 |
Name: rubygem-%{gem_name}
|
|
|
758eabc |
Version: 4.1.2
|
|
|
2c6047a |
Release: 3%{?dist}
|
|
|
758eabc |
Summary: Simple one-liner tests for common Rails functionality
|
|
|
6f58083 |
License: MIT
|
|
|
758eabc |
URL: https://matchers.shoulda.io/
|
|
|
6f58083 |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
758eabc |
# git clone https://github.com/thoughtbot/shoulda-matchers.git && cd shoulda-matchers
|
|
|
758eabc |
# git archive -v -o shoulda-matchers-4.1.2-specs.tar.gz v4.1.2 spec/
|
|
|
758eabc |
Source1: shoulda-matchers-4.1.2-specs.tar.gz
|
|
|
758eabc |
|
|
|
6f58083 |
BuildRequires: ruby(release)
|
|
|
6f58083 |
BuildRequires: rubygems-devel
|
|
|
664648c |
BuildRequires: ruby
|
|
|
6f58083 |
BuildRequires: rubygem(bcrypt)
|
|
|
6f58083 |
BuildRequires: rubygem(jbuilder)
|
|
|
6f58083 |
BuildRequires: rubygem(rails)
|
|
|
68a0bb3 |
BuildRequires: rubygem(rails-controller-testing)
|
|
|
68a0bb3 |
BuildRequires: rubygem(rspec)
|
|
|
6f58083 |
BuildRequires: rubygem(rspec-rails)
|
|
|
664648c |
BuildRequires: rubygem(shoulda-context)
|
|
|
6f58083 |
BuildRequires: rubygem(spring)
|
|
|
6f58083 |
BuildRequires: rubygem(sqlite3)
|
|
|
6f58083 |
BuildArch: noarch
|
|
|
6f58083 |
|
|
|
6f58083 |
%description
|
|
|
758eabc |
Shoulda Matchers provides RSpec- and Minitest-compatible one-liners to test
|
|
|
758eabc |
common Rails functionality that, if written by hand, would be much longer,
|
|
|
6f58083 |
more complex, and error-prone.
|
|
|
6f58083 |
|
|
|
6f58083 |
|
|
|
6f58083 |
%package doc
|
|
|
6f58083 |
Summary: Documentation for %{name}
|
|
|
6f58083 |
Requires: %{name} = %{version}-%{release}
|
|
|
6f58083 |
BuildArch: noarch
|
|
|
6f58083 |
|
|
|
6f58083 |
%description doc
|
|
|
6f58083 |
Documentation for %{name}.
|
|
|
6f58083 |
|
|
|
6f58083 |
%prep
|
|
|
758eabc |
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
6f58083 |
|
|
|
6f58083 |
%build
|
|
|
6f58083 |
# Create the gem as gem install only works on a gem file
|
|
|
68a0bb3 |
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
6f58083 |
|
|
|
6f58083 |
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
|
|
6f58083 |
# by default, so that we can move it into the buildroot in %%install
|
|
|
6f58083 |
%gem_install
|
|
|
6f58083 |
|
|
|
6f58083 |
%install
|
|
|
6f58083 |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
6f58083 |
cp -a .%{gem_dir}/* \
|
|
|
6f58083 |
%{buildroot}%{gem_dir}/
|
|
|
6f58083 |
|
|
|
68a0bb3 |
|
|
|
6f58083 |
|
|
|
6f58083 |
%check
|
|
|
6f58083 |
pushd .%{gem_instdir}
|
|
|
758eabc |
ln -s %{_builddir}/spec spec
|
|
|
6f58083 |
|
|
|
0ad1b18 |
# It is easier to recreate the Gemfile to use local versions of gems.
|
|
|
0ad1b18 |
cat << GF > Gemfile
|
|
|
0ad1b18 |
source 'https://rubygems.org'
|
|
|
0ad1b18 |
|
|
|
0ad1b18 |
gem 'bcrypt'
|
|
|
0ad1b18 |
gem 'rails'
|
|
|
68a0bb3 |
gem 'rails-controller-testing'
|
|
|
68a0bb3 |
gem 'rspec'
|
|
|
68a0bb3 |
gem 'rspec-rails'
|
|
|
0ad1b18 |
gem 'sqlite3'
|
|
|
68a0bb3 |
gem 'spring'
|
|
|
0ad1b18 |
GF
|
|
|
0ad1b18 |
|
|
|
68a0bb3 |
# Pry is useless for our purposes.
|
|
|
68a0bb3 |
sed -i "/require 'pry/ s/^/#/" spec/spec_helper.rb
|
|
|
0ad1b18 |
|
|
|
68a0bb3 |
# Avoid Appraisal and Bundler.
|
|
|
68a0bb3 |
sed -i "/current_bundle/ s/^/#/" spec/acceptance_spec_helper.rb
|
|
|
68a0bb3 |
sed -i "/assert_appraisal/ s/^/#/" spec/acceptance_spec_helper.rb
|
|
|
68a0bb3 |
sed -i "/current_bundle/ s/^/#/" spec/support/unit/load_environment.rb
|
|
|
68a0bb3 |
sed -i "/assert_appraisal/ s/^/#/" spec/support/unit/load_environment.rb
|
|
|
0ad1b18 |
|
|
|
68a0bb3 |
# Avoid bootsnap, listen, puma and sprockets dependencies.
|
|
|
758eabc |
sed -i "/def rails_new_command/,/^ end$/ {
|
|
|
758eabc |
/\]/i\ '--skip-listen',
|
|
|
758eabc |
}" spec/support/unit/rails_application.rb
|
|
|
68a0bb3 |
sed -i '/rails new/ s/"$/ --skip-bootsnap --skip-listen --skip-puma --skip-sprockets"/' spec/support/acceptance/helpers/step_helpers.rb
|
|
|
68a0bb3 |
|
|
|
758eabc |
bundle exec rspec spec/unit
|
|
|
758eabc |
|
|
|
68a0bb3 |
# Don't test against PostgreSQL, it would just complicate everything.
|
|
|
68a0bb3 |
sed -i "/bundle.add_gem 'pg'/ s/^/#/" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
68a0bb3 |
# spring-commands-rspec is not in Fedora yet, but the test suite looks to pass
|
|
|
68a0bb3 |
# without it just fine.
|
|
|
68a0bb3 |
sed -i "/add_gem 'spring-commands-rspec'/ s/^/#/" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
68a0bb3 |
# Remove useless test dependencies.
|
|
|
68a0bb3 |
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
68a0bb3 |
bundle.remove_gem 'capybara'" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
68a0bb3 |
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
68a0bb3 |
bundle.remove_gem 'selenium-webdriver'" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
68a0bb3 |
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
68a0bb3 |
bundle.remove_gem 'chromedriver-helper'" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
6f58083 |
|
|
|
758eabc |
# Remove minitest-reporters dependency
|
|
|
758eabc |
# https://github.com/thoughtbot/shoulda-matchers/pull/1251
|
|
|
758eabc |
sed -i "/def add_minitest_to_project/,/^ end$/ {
|
|
|
758eabc |
/initest.*eporters/ s/^/#/
|
|
|
758eabc |
}" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
758eabc |
sed -i '/run_n_unit_tests/ s/courier_test\.rb/courier_test.rb - -v/' spec/acceptance/independent_matchers_spec.rb
|
|
|
758eabc |
|
|
|
758eabc |
# Keep the unrestricted SQLite3 dependency.
|
|
|
758eabc |
sed -i "/sqlite3/ s/^/#/" spec/support/acceptance/helpers/step_helpers.rb
|
|
|
758eabc |
|
|
|
0ad1b18 |
bundle exec rspec spec/acceptance
|
|
|
6f58083 |
|
|
|
6f58083 |
popd
|
|
|
6f58083 |
|
|
|
6f58083 |
%files
|
|
|
6f58083 |
%dir %{gem_instdir}
|
|
|
0ad1b18 |
%license %{gem_instdir}/MIT-LICENSE
|
|
|
6f58083 |
%{gem_libdir}
|
|
|
6f58083 |
%exclude %{gem_cache}
|
|
|
6f58083 |
%{gem_spec}
|
|
|
6f58083 |
|
|
|
6f58083 |
%files doc
|
|
|
6f58083 |
%doc %{gem_docdir}
|
|
|
6f58083 |
%doc %{gem_instdir}/README.md
|
|
|
68a0bb3 |
%doc %{gem_instdir}/docs
|
|
|
6f58083 |
%{gem_instdir}/shoulda-matchers.gemspec
|
|
|
6f58083 |
|
|
|
6f58083 |
%changelog
|
|
|
2c6047a |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-3
|
|
|
2c6047a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
2c6047a |
|
|
|
460f43a |
* Mon Nov 11 2019 Vít Ondruch <vondruch@redhat.com> - 4.1.2-2
|
|
|
460f43a |
- Remove unnecessary BR: rubygem(minitest-reporters).
|
|
|
460f43a |
|
|
|
758eabc |
* Thu Nov 07 2019 Vít Ondruch <vondruch@redhat.com> - 4.1.2-1
|
|
|
758eabc |
- Update to should-matchers 4.1.2.
|
|
|
758eabc |
|
|
|
0232b91 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-3
|
|
|
0232b91 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
0232b91 |
|
|
|
74d2edb |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-2
|
|
|
74d2edb |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
74d2edb |
|
|
|
68a0bb3 |
* Sat Aug 11 2018 Vít Ondruch <vondruch@redhat.com> - 3.1.2-1
|
|
|
68a0bb3 |
- Update to should-matchers 3.1.2.
|
|
|
68a0bb3 |
|
|
|
524b2c4 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-6
|
|
|
524b2c4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
524b2c4 |
|
|
|
42c491b |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-5
|
|
|
42c491b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
42c491b |
|
|
|
b6d2a9f |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-4
|
|
|
b6d2a9f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
b6d2a9f |
|
|
|
29a4cfa |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-3
|
|
|
29a4cfa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
29a4cfa |
|
|
|
0ef53c1 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-2
|
|
|
0ef53c1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
0ef53c1 |
|
|
|
0ad1b18 |
* Fri Jun 26 2015 Vít Ondruch <vondruch@redhat.com> - 2.8.0-1
|
|
|
0ad1b18 |
- Update to should-matchers 2.8.0.
|
|
|
0ad1b18 |
|
|
|
3791b65 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-4
|
|
|
3791b65 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
3791b65 |
|
|
|
6bc8713 |
* Mon Jul 07 2014 Vít Ondruch <vondruch@redhat.com> - 2.6.1-3
|
|
|
6bc8713 |
- Workaround RoR 4.1.2+ compatibility issue.
|
|
|
fb298fc |
- Relax Rake dependency.
|
|
|
6bc8713 |
|
|
|
664648c |
* Thu Jul 03 2014 Vít Ondruch <vondruch@redhat.com> - 2.6.1-2
|
|
|
664648c |
- Add missing BR: rubygem(shoulda-context).
|
|
|
664648c |
- Updated upstream URL.
|
|
|
664648c |
- Relaxed BR: ruby dependency.
|
|
|
664648c |
|
|
|
6f58083 |
* Mon Jun 30 2014 Vít Ondruch <vondruch@redhat.com> - 2.6.1-1
|
|
|
6f58083 |
- Initial package
|