Mock Version: 2.4 Mock Version: 2.4 Mock Version: 2.4 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/rubygem-rspec-collection_matchers.spec'], chrootPath='/var/lib/mock/f32-build-22050854-1853307/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/rubygem-rspec-collection_matchers.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1596727031 Wrote: /builddir/build/SRPMS/rubygem-rspec-collection_matchers-1.2.0-1.fc32.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/rubygem-rspec-collection_matchers.spec'], chrootPath='/var/lib/mock/f32-build-22050854-1853307/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/rubygem-rspec-collection_matchers.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1596727031 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.cE41GW + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rspec-collection_matchers-1.2.0 + /usr/bin/gem unpack /builddir/build/SOURCES/rspec-collection_matchers-1.2.0.gem Unpacked gem: '/builddir/build/BUILD/rspec-collection_matchers-1.2.0' + /usr/bin/gem spec /builddir/build/SOURCES/rspec-collection_matchers-1.2.0.gem --ruby + STATUS=0 + '[' 0 -ne 0 ']' + cd rspec-collection_matchers-1.2.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.IQBzvY + umask 022 + cd /builddir/build/BUILD + cd rspec-collection_matchers-1.2.0 + gem build ../rspec-collection_matchers-1.2.0.gemspec WARNING: prerelease dependency on rspec-expectations (>= 2.99.0.beta1) is not recommended WARNING: open-ended dependency on bundler (>= 1.3, development) is not recommended if bundler is semantically versioned, use: add_development_dependency 'bundler', '~> 1.3' WARNING: open-ended dependency on activemodel (>= 3.0, development) is not recommended if activemodel is semantically versioned, use: add_development_dependency 'activemodel', '~> 3.0' WARNING: See http://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: rspec-collection_matchers Version: 1.2.0 File: rspec-collection_matchers-1.2.0.gem + mkdir -p ./usr/share/gems + CONFIGURE_ARGS='--with-cflags='\''-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=neon -mfloat-abi=hard'\'' --with-cxxflags='\''-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=neon -mfloat-abi=hard'\'' ' + gem install -V --local --build-root . --force --document=ri,rdoc rspec-collection_matchers-1.2.0.gem WARNING: You build with buildroot. Build root: /builddir/build/BUILD/rspec-collection_matchers-1.2.0 Bin dir: /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/bin Gem home: /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/.gitignore /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/.rspec /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/.travis.yml /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/Changelog.md /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/Gemfile /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/LICENSE.txt /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/README.md /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/Rakefile /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/features/have.feature /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/features/support/env.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib/rspec/collection_matchers.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib/rspec/collection_matchers/have.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib/rspec/collection_matchers/matchers.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib/rspec/collection_matchers/rails_extensions.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib/rspec/collection_matchers/version.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/rspec-collection_matchers.gemspec /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/script/test_all /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/rspec/collection_matchers/have_spec.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/rspec/collection_matchers/rails_extensions_spec.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/spec_helper.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/support/classes.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/support/matchers.rb /builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/spec/support/shared_examples.rb Successfully installed rspec-collection_matchers-1.2.0 Parsing documentation for rspec-collection_matchers-1.2.0 Parsing sources... 20% [ 1/ 5] lib/rspec/collection_matchers.rb 40% [ 2/ 5] lib/rspec/collection_matchers/have.rb 60% [ 3/ 5] lib/rspec/collection_matchers/matchers.rb 80% [ 4/ 5] lib/rspec/collection_matchers/rails_extensions.rb 100% [ 5/ 5] lib/rspec/collection_matchers/version.rb Installing ri documentation for rspec-collection_matchers-1.2.0 Installing darkfish documentation for rspec-collection_matchers-1.2.0 Done installing documentation for rspec-collection_matchers after 0 seconds 1 gem installed + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.D4uXiW + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch ++ dirname /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch + cd rspec-collection_matchers-1.2.0 + mkdir -p /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch/usr/share/gems + cp -a ./usr/share/gems/build_info ./usr/share/gems/cache ./usr/share/gems/doc ./usr/share/gems/extensions ./usr/share/gems/gems ./usr/share/gems/specifications /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch/usr/share/gems/ + /usr/lib/rpm/find-debuginfo.sh -j5 --strict-build-id -m -i --build-id-seed 1.2.0-1.fc32 --unique-debug-suffix -1.2.0-1.fc32.noarch --unique-debug-src-base rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/rspec-collection_matchers-1.2.0 + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile /usr/bin/python 1 0 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/share/gems/gems/rspec-collection_matchers-1.2.0/script/test_all from /bin/bash to #!/usr/bin/bash Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.LZrDVX + umask 022 + cd /builddir/build/BUILD ~/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0 ~/build/BUILD/rspec-collection_matchers-1.2.0 + cd rspec-collection_matchers-1.2.0 + pushd ./usr/share/gems/gems/rspec-collection_matchers-1.2.0 + rspec spec Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 17907 RSpec::CollectionMatchers::Syntax expression generation when both :should and :expect are enabled generates a negative expression using the expect syntax generates a positive expression using the expect syntax when only :should is enabled generates a positive expression using the expect syntax generates a negative expression using the expect syntax when only :expect is enabled generates a negative expression using the expect syntax generates a positive expression using the expect syntax have matcher expect(...).to have(n).items where result responds to items but returns something other than a collection provides a meaningful error provides a meaningful error have(n).items where target IS a collection references the number of items IN the collection fails when the number of items IN the collection is not as expected expect(...).not_to have(n).items passes if target has a collection of items with < n members fails if target has a collection of items with n members passes if target has a collection of items with > n members RSpec::CollectionMatchers::Have for a collection owner that implements #send blows up when the owner doesn't respond to that method works when #send is defined directly on an array works when doing automatic pluralization works in the straightforward case have(n).characters where target IS a String passes if the length is correct fails if the length is incorrect expect(...).to have(1).item when Inflector is defined pluralizes the collection name expect(...).to have_at_least(n).items fails if target has a collection of items with < n members passes if target has a collection of items with > n members passes if target has a collection of items with n members provides educational negative failure messages expect(...).to have(n).items fails if target has a collection of items with > n members converts a String argument to Integer fails if target has a collection of items with < n members passes if target has a collection of items with n members converts :no to 0 behaves like an RSpec matcher matches a valid value when using #== so it can be composed does not match an invalid value when using #== so it can be composed expectations compounded with RSpec::Matchers::Composable using the have matcher as an argument of another matcher has an alias for the have_at_least matcher (PENDING: Not yet implemented) has an alias for the have matcher has an alias for the have_at_most matcher (PENDING: Not yet implemented) using #or passes when only first expectation is met passes when only second expectation is met fails with relevant error when neither expectation is met passes when both expectations are met using #and passes when both expectations are met fails with relevant error when only second expectation fails fails with relevant error when only first expectation fails fails with relevant error when both expectations fail expect(...).to have(1).item when ActiveSupport::Inflector is defined pluralizes the collection name when ActiveSupport::Inflector is partially loaded without its inflectors does not pluralize the collection name RSpec::CollectionMatchers::Have for an Enumerator whose size is nil but count is supplied works fine have(n).items(args, block) passes args to target passes block to target have(n).things on an object which is not a collection nor contains one fails expect(...).to have_at_most(n).items passes if target has a collection of items with < n members fails if target has a collection of items with > n members passes if target has a collection of items with n members provides educational negative failure messages description generation the have matcher generates its own description the have_at_most matcher generates its own description the have_at_least matcher generates its own description expect(...).to have_exactly(n).items converts :no to 0 fails if target has a collection of items with < n members passes if target has a collection of items with n members fails if target has a collection of items with > n members RSpec::CollectionMatchers::Have has method_missing as private does not respond_to? method_missing (because it's private) respond_to? is true for a method which Have defines is true for a method that it's superclass (Object) defines is false for a method which neither Object nor nor Have defines is false if the owner doesn't respond to the method is true if the owner responds to the method Have extensions for rails error_on provides a failure message including the number actually given provides a description including the name of what the error is on errors_on returns the errors on that attribute provides a description including the name of what the error is on calls valid? provides a failure message including the number actually given ActiveModel class that takes no arguments to valid? with nil name /usr/share/gems/gems/activemodel-5.2.3/lib/active_model/naming.rb:190: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/share/gems/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `translate' is defined here /usr/share/gems/gems/activemodel-5.2.3/lib/active_model/translation.rb:67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/share/gems/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `translate' is defined here /usr/share/gems/gems/activemodel-5.2.3/lib/active_model/errors.rb:430: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/share/gems/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `translate' is defined here has one error with non-blank name has no error have something other than error_on or errors_on has a standard rspec failure message has a standard rspec description Pending: (Failures listed here are expected and do not affect your suite's status) 1) have matcher expectations compounded with RSpec::Matchers::Composable using the have matcher as an argument of another matcher has an alias for the have_at_least matcher # Not yet implemented # ./spec/rspec/collection_matchers/have_spec.rb:444 2) have matcher expectations compounded with RSpec::Matchers::Composable using the have matcher as an argument of another matcher has an alias for the have_at_most matcher # Not yet implemented # ./spec/rspec/collection_matchers/have_spec.rb:443 Finished in 0.19573 seconds (files took 0.50683 seconds to load) 76 examples, 0 failures, 2 pending Randomized with seed 17907 + RUBYOPT=-I/builddir/build/BUILD/rspec-collection_matchers-1.2.0/usr/share/gems/gems/rspec-collection_matchers-1.2.0/lib + cucumber Feature: have(n).items matcher RSpec provides several matchers that make it easy to set expectations about the size of a collection. There are three basic forms: ```ruby collection.should have(x).items collection.should have_at_least(x).items collection.should have_at_most(x).items ``` In addition, #have_exactly is provided as an alias to #have. These work on any collection-like object--the object just needs to respond to #size or #length (or both). When the matcher is called directly on a collection object, the #items call is pure syntactic sugar. You can use anything you want here. These are equivalent: ```ruby collection.should have(x).items collection.should have(x).things ``` You can also use this matcher on a non-collection object that returns a collection from one of its methods. For example, Dir#entries returns an array, so you could set an expectation using the following: ```ruby Dir.new("my/directory").should have(7).entries ``` Scenario: have(x).items on a collection # features/have.feature:32 Given a file named "have_items_spec.rb" with: # aruba-0.14.14/lib/aruba/cucumber/file.rb:23 """ require 'rspec/collection_matchers' describe [1, 2, 3] do it { should have(3).items } it { should_not have(2).items } it { should_not have(4).items } it { should have_exactly(3).items } it { should_not have_exactly(2).items } it { should_not have_exactly(4).items } it { should have_at_least(2).items } it { should have_at_most(4).items } # deliberate failures it { should_not have(3).items } it { should have(2).items } it { should have(4).items } it { should_not have_exactly(3).items } it { should have_exactly(2).items } it { should have_exactly(4).items } it { should have_at_least(4).items } it { should have_at_most(2).items } end """ When I run `rspec have_items_spec.rb` # aruba-0.14.14/lib/aruba/cucumber/command.rb:6 Then the output should contain "16 examples, 8 failures" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected target not to have 3 items, got 3" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected 2 items, got 3" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected 4 items, got 3" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected at least 4 items, got 3" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected at most 2 items, got 3" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 Scenario: have(x).words on a String when String#words is defined # features/have.feature:70 Given a file named "have_words_spec.rb" with: # aruba-0.14.14/lib/aruba/cucumber/file.rb:23 """ require 'rspec/collection_matchers' class String def words split(' ') end end describe "a sentence with some words" do it { should have(5).words } it { should_not have(4).words } it { should_not have(6).words } it { should have_exactly(5).words } it { should_not have_exactly(4).words } it { should_not have_exactly(6).words } it { should have_at_least(4).words } it { should have_at_most(6).words } # deliberate failures it { should_not have(5).words } it { should have(4).words } it { should have(6).words } it { should_not have_exactly(5).words } it { should have_exactly(4).words } it { should have_exactly(6).words } it { should have_at_least(6).words } it { should have_at_most(4).words } end """ When I run `rspec have_words_spec.rb` # aruba-0.14.14/lib/aruba/cucumber/command.rb:6 Then the output should contain "16 examples, 8 failures" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected target not to have 5 words, got 5" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected 4 words, got 5" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected 6 words, got 5" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected at least 6 words, got 5" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 And the output should contain "expected at most 4 words, got 5" # aruba-0.14.14/lib/aruba/cucumber/command.rb:139 2 scenarios (2 passed) 16 steps (16 passed) 0m1.053s /usr/share/gems/gems/cucumber-core-3.2.0/lib/cucumber/core/test/result.rb:12: warning: calling private without arguments inside a method may not have the intended effect + popd ~/build/BUILD/rspec-collection_matchers-1.2.0 + RPM_EC=0 ++ jobs -p + exit 0 Processing files: rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch Provides: rubygem(rspec-collection_matchers) = 1.2.0 rubygem-rspec-collection_matchers = 1.2.0-1.fc32 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/bash ruby(rubygems) rubygem(rspec-expectations) >= 2.99.0.beta1 Processing files: rubygem-rspec-collection_matchers-doc-1.2.0-1.fc32.noarch Provides: rubygem-rspec-collection_matchers-doc = 1.2.0-1.fc32 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch Wrote: /builddir/build/RPMS/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch.rpm Wrote: /builddir/build/RPMS/rubygem-rspec-collection_matchers-doc-1.2.0-1.fc32.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.qwoTBW + umask 022 + cd /builddir/build/BUILD + cd rspec-collection_matchers-1.2.0 + /usr/bin/rm -rf /builddir/build/BUILDROOT/rubygem-rspec-collection_matchers-1.2.0-1.fc32.noarch + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0