Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-rspec-core for openSUSE:Factory checked in at 2022-02-28 19:43:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-core (Old) and /work/SRC/openSUSE:Factory/.rubygem-rspec-core.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rspec-core" Mon Feb 28 19:43:06 2022 rev:31 rq:956126 version:3.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rspec-core/rubygem-rspec-core.changes 2021-01-22 21:49:26.413603685 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-rspec-core.new.1958/rubygem-rspec-core.changes 2022-02-28 19:43:08.817931818 +0100 @@ -1,0 +2,36 @@ +Tue Feb 15 07:40:30 UTC 2022 - Stephan Kulow <co...@suse.com> + +updated to version 3.11.0 + see installed Changelog.md + + ### Development + [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.11.0...3-11-maintenance) + + ### 3.11.0 / 2022-02-09 + [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.2...v3.11.0) + + Enhancements: + + * Improve pluralisation of words ending with `s` (like process). (Joshua Pinter, #2779) + * Add ordering by file modification time (most recent first). (Matheus Richard, #2778) + * Add `to_s` to reserved names for #let and #subject. (Nick Fl??ckiger, #2886) + * Introduce `RSpec.current_scope` to expose the current scope in which + RSpec is executing. e.g. `:before_example_hook`, `:example` etc. (@odinhb, #2895) + * Add named bold colours as options for custom colours. (#2913, #2914) + * Warn when (but not prevent) a `SystemExit` occurs. (Jared Beck, #2926) + + ### 3.10.2 / 2022-01-27 + [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.1...v3.10.2) + + Bug fixes: + + * Ensure bisect communication uses consistent encoding. (Mike Jarema, #2852) + * Fix exception presenter when the root cause exception has nil backtrace. + (Zinovyev Ivan, #2903) + * Fix `inspect` output of `RSpec::Core::Example::Procsy` to namespace correctly. + (Keiko Kaneko, #2915) + * Ensure formatters not exposing `#output` will not crash duplicate check. + (@niceking, #2916) + + +------------------------------------------------------------------- Old: ---- rspec-core-3.10.1.gem New: ---- rspec-core-3.11.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rspec-core.spec ++++++ --- /var/tmp/diff_new_pack.wRHvvI/_old 2022-02-28 19:43:09.445932054 +0100 +++ /var/tmp/diff_new_pack.wRHvvI/_new 2022-02-28 19:43:09.449932055 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-rspec-core # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-rspec-core -Version: 3.10.1 +Version: 3.11.0 Release: 0 %define mod_name rspec-core %define mod_full_name %{mod_name}-%{version} ++++++ rspec-core-3.10.1.gem -> rspec-core-3.11.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md --- old/Changelog.md 2020-12-27 17:10:48.000000000 +0100 +++ new/Changelog.md 2022-02-09 12:38:32.000000000 +0100 @@ -1,7 +1,35 @@ +### Development +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.11.0...3-11-maintenance) + +### 3.11.0 / 2022-02-09 +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.2...v3.11.0) + +Enhancements: + +* Improve pluralisation of words ending with `s` (like process). (Joshua Pinter, #2779) +* Add ordering by file modification time (most recent first). (Matheus Richard, #2778) +* Add `to_s` to reserved names for #let and #subject. (Nick Fl??ckiger, #2886) +* Introduce `RSpec.current_scope` to expose the current scope in which + RSpec is executing. e.g. `:before_example_hook`, `:example` etc. (@odinhb, #2895) +* Add named bold colours as options for custom colours. (#2913, #2914) +* Warn when (but not prevent) a `SystemExit` occurs. (Jared Beck, #2926) + +### 3.10.2 / 2022-01-27 +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.1...v3.10.2) + +Bug fixes: + +* Ensure bisect communication uses consistent encoding. (Mike Jarema, #2852) +* Fix exception presenter when the root cause exception has nil backtrace. + (Zinovyev Ivan, #2903) +* Fix `inspect` output of `RSpec::Core::Example::Procsy` to namespace correctly. + (Keiko Kaneko, #2915) +* Ensure formatters not exposing `#output` will not crash duplicate check. + (@niceking, #2916) + ### 3.10.1 / 2020-12-27 [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.0...v3.10.1) - Bug fixes: * RSpec warning output was missing deprecations from Ruby, these are now included. @@ -17,7 +45,7 @@ * Add configuration for an error exit code (to disambiguate errored builds from failed builds by exit status). (Dana Sherson, #2749) -# 3.9.3 / 2020-09-30 +### 3.9.3 / 2020-09-30 [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.9.2...v3.9.3) Bug Fixes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2020-12-27 17:10:48.000000000 +0100 +++ new/README.md 2022-02-09 12:38:32.000000000 +0100 @@ -1,4 +1,4 @@ -# rspec-core [](http://travis-ci.org/rspec/rspec-core) [](https://codeclimate.com/github/rspec/rspec-core) +# rspec-core [](https://github.com/rspec/rspec-core/actions) [](https://codeclimate.com/github/rspec/rspec-core) rspec-core provides the structure for writing executable examples of how your code should behave, and an `rspec` command with tools to constrain which Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/bisect/utilities.rb new/lib/rspec/core/bisect/utilities.rb --- old/lib/rspec/core/bisect/utilities.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/bisect/utilities.rb 2022-02-09 12:38:32.000000000 +0100 @@ -29,11 +29,22 @@ end # Wraps a pipe to support sending objects between a child and - # parent process. + # parent process. Where supported, encoding is explicitly + # set to ensure binary data is able to pass from child to + # parent. # @private class Channel + if String.method_defined?(:encoding) + MARSHAL_DUMP_ENCODING = Marshal.dump("").encoding + end + def initialize @read_io, @write_io = IO.pipe + + if defined?(MARSHAL_DUMP_ENCODING) && IO.method_defined?(:set_encoding) + # Ensure the pipe can send any content produced by Marshal.dump + @write_io.set_encoding MARSHAL_DUMP_ENCODING + end end def send(message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/configuration.rb new/lib/rspec/core/configuration.rb --- old/lib/rspec/core/configuration.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/configuration.rb 2022-02-09 12:38:32.000000000 +0100 @@ -2063,10 +2063,13 @@ return yield if dry_run? begin + RSpec.current_scope = :before_suite_hook run_suite_hooks("a `before(:suite)` hook", @before_suite_hooks) yield ensure + RSpec.current_scope = :after_suite_hook run_suite_hooks("an `after(:suite)` hook", @after_suite_hooks) + RSpec.current_scope = :suite end end @@ -2119,6 +2122,14 @@ relative_file = Metadata.relative_path(file) reporter.notify_non_example_exception(ex, "An error occurred while loading #{relative_file}.") RSpec.world.wants_to_quit = true + rescue SystemExit => ex + relative_file = Metadata.relative_path(file) + reporter.notify_non_example_exception( + ex, + "While loading #{relative_file} an `exit` / `raise SystemExit` occurred, RSpec will now quit." + ) + RSpec.world.rspec_is_quitting = true + raise ex end def handle_suite_hook(scope, meta) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/example.rb new/lib/rspec/core/example.rb --- old/lib/rspec/core/example.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/example.rb 2022-02-09 12:38:32.000000000 +0100 @@ -259,6 +259,7 @@ with_around_and_singleton_context_hooks do begin run_before_example + RSpec.current_scope = :example @example_group_instance.instance_exec(self, &@example_block) if pending? @@ -278,6 +279,7 @@ rescue AllExceptionsExcludingDangerousOnesOnRubiesThatAllowIt => e set_exception(e) ensure + RSpec.current_scope = :after_example_hook run_after_example end end @@ -375,7 +377,7 @@ # @private def inspect - @example.inspect.gsub('Example', 'ExampleProcsy') + @example.inspect.gsub('Example', 'Example::Procsy') end end @@ -462,6 +464,7 @@ end def with_around_example_hooks + RSpec.current_scope = :before_example_hook hooks.run(:around, :example, self) { yield } rescue Support::AllExceptionsExceptOnesWeMustNotRescue => e set_exception(e) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/example_group.rb new/lib/rspec/core/example_group.rb --- old/lib/rspec/core/example_group.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/example_group.rb 2022-02-09 12:38:32.000000000 +0100 @@ -602,6 +602,7 @@ should_run_context_hooks = descendant_filtered_examples.any? begin + RSpec.current_scope = :before_context_hook run_before_context_hooks(new('before(:context) hook')) if should_run_context_hooks result_for_this_group = run_examples(reporter) results_for_descendants = ordering_strategy.order(children).map { |child| child.run(reporter) }.all? @@ -614,6 +615,7 @@ RSpec.world.wants_to_quit = true if reporter.fail_fast_limit_met? false ensure + RSpec.current_scope = :after_context_hook run_after_context_hooks(new('after(:context) hook')) if should_run_context_hooks reporter.example_group_finished(self) end @@ -701,6 +703,7 @@ end end + # @private def initialize(inspect_output=nil) @__inspect_output = inspect_output || '(no description provided)' super() # no args get passed @@ -782,6 +785,7 @@ # @return [String] the location where the shared example was included attr_reader :inclusion_location + # @private def initialize(shared_group_name, inclusion_location) @shared_group_name = shared_group_name @inclusion_location = inclusion_location diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters/console_codes.rb new/lib/rspec/core/formatters/console_codes.rb --- old/lib/rspec/core/formatters/console_codes.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/formatters/console_codes.rb 2022-02-09 12:38:32.000000000 +0100 @@ -7,15 +7,23 @@ # @private VT100_CODES = { - :black => 30, - :red => 31, - :green => 32, - :yellow => 33, - :blue => 34, - :magenta => 35, - :cyan => 36, - :white => 37, - :bold => 1, + :black => 30, + :red => 31, + :green => 32, + :yellow => 33, + :blue => 34, + :magenta => 35, + :cyan => 36, + :white => 37, + :bold_black => '1;30', + :bold_red => '1;31', + :bold_green => '1;32', + :bold_yellow => '1;33', + :bold_blue => '1;34', + :bold_magenta => '1;35', + :bold_cyan => '1;36', + :bold_white => '1;37', + :bold => 1, } # @private VT100_CODE_VALUES = VT100_CODES.invert diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters/exception_presenter.rb new/lib/rspec/core/formatters/exception_presenter.rb --- old/lib/rspec/core/formatters/exception_presenter.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/formatters/exception_presenter.rb 2022-02-09 12:38:32.000000000 +0100 @@ -55,7 +55,7 @@ cause << " #{line}" end - unless last_cause.backtrace.empty? + unless last_cause.backtrace.nil? || last_cause.backtrace.empty? cause << (" #{backtrace_formatter.format_backtrace(last_cause.backtrace, example.metadata).first}") end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters/helpers.rb new/lib/rspec/core/formatters/helpers.rb --- old/lib/rspec/core/formatters/helpers.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/formatters/helpers.rb 2022-02-09 12:38:32.000000000 +0100 @@ -86,7 +86,15 @@ # @param string [String] word to be pluralized # @return [String] pluralized word def self.pluralize(count, string) - "#{count} #{string}#{'s' unless count.to_f == 1}" + pluralized_string = if count.to_f == 1 + string + elsif string.end_with?('s') # e.g. "process" + "#{string}es" # e.g. "processes" + else + "#{string}s" + end + + "#{count} #{pluralized_string}" end # @api private diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters.rb new/lib/rspec/core/formatters.rb --- old/lib/rspec/core/formatters.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/formatters.rb 2022-02-09 12:38:32.000000000 +0100 @@ -79,7 +79,7 @@ # Register the formatter class # @param formatter_class [Class] formatter class to register - # @param notifications [Symbol, ...] one or more notifications to be + # @param notifications [Array<Symbol>] one or more notifications to be # registered to the specified formatter # # @see RSpec::Core::Formatters::BaseFormatter @@ -194,10 +194,16 @@ def duplicate_formatter_exists?(new_formatter) @formatters.any? do |formatter| - formatter.class == new_formatter.class && formatter.output == new_formatter.output + formatter.class == new_formatter.class && + has_matching_output?(formatter, new_formatter) end end + def has_matching_output?(formatter, new_formatter) + return true unless formatter.respond_to?(:output) && new_formatter.respond_to?(:output) + formatter.output == new_formatter.output + end + def existing_formatter_implements?(notification) @reporter.registered_listeners(notification).any? end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/memoized_helpers.rb new/lib/rspec/core/memoized_helpers.rb --- old/lib/rspec/core/memoized_helpers.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/memoized_helpers.rb 2022-02-09 12:38:32.000000000 +0100 @@ -78,6 +78,7 @@ # @note If you are using RSpec's newer expect-based syntax you may # want to use `is_expected.to` instead of `should`. def should(matcher=nil, message=nil) + enforce_value_expectation(matcher, 'should') RSpec::Expectations::PositiveExpectationHandler.handle_matcher(subject, matcher, message) end @@ -97,6 +98,7 @@ # @note If you are using RSpec's newer expect-based syntax you may # want to use `is_expected.to_not` instead of `should_not`. def should_not(matcher=nil, message=nil) + enforce_value_expectation(matcher, 'should_not') RSpec::Expectations::NegativeExpectationHandler.handle_matcher(subject, matcher, message) end @@ -145,6 +147,26 @@ end # @private + def enforce_value_expectation(matcher, method_name) + return if matcher_supports_value_expectations?(matcher) + + RSpec.deprecate( + "#{method_name} #{RSpec::Support::ObjectFormatter.format(matcher)}", + :message => + "The implicit block expectation syntax is deprecated, you should pass " \ + "a block to `expect` to use the provided block expectation matcher " \ + "(#{RSpec::Support::ObjectFormatter.format(matcher)}), " \ + "or the matcher must implement `supports_value_expectations?`." + ) + end + + def matcher_supports_value_expectations?(matcher) + matcher.supports_value_expectations? + rescue + true + end + + # @private class ThreadsafeMemoized def initialize @memoized = {} @@ -285,9 +307,13 @@ # We have to pass the block directly to `define_method` to # allow it to use method constructs like `super` and `return`. raise "#let or #subject called without a block" if block.nil? - raise( - "#let or #subject called with a reserved name #initialize" - ) if :initialize == name + + # A list of reserved words that can't be used as a name for a memoized helper + # Matches for both symbols and passed strings + if [:initialize, :to_s].include?(name.to_sym) + raise ArgumentError, "#let or #subject called with reserved name `#{name}`" + end + our_module = MemoizedHelpers.module_for(self) # If we have a module clash in our helper module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/option_parser.rb new/lib/rspec/core/option_parser.rb --- old/lib/rspec/core/option_parser.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/option_parser.rb 2022-02-09 12:38:32.000000000 +0100 @@ -58,10 +58,11 @@ end parser.on('--order TYPE[:SEED]', 'Run examples by the specified order type.', - ' [defined] examples and groups are run in the order they are defined', - ' [rand] randomize the order of groups and examples', - ' [random] alias for rand', - ' [random:SEED] e.g. --order random:123') do |o| + ' [defined] examples and groups are run in the order they are defined', + ' [rand] randomize the order of groups and examples', + ' [random] alias for rand', + ' [random:SEED] e.g. --order random:123', + ' [recently-modified] run the most recently modified files first') do |o| options[:order] = o end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/ordering.rb new/lib/rspec/core/ordering.rb --- old/lib/rspec/core/ordering.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/ordering.rb 2022-02-09 12:38:32.000000000 +0100 @@ -59,6 +59,14 @@ end # @private + # Orders items by modification time (most recent modified first). + class RecentlyModified + def order(list) + list.sort_by { |item| -File.mtime(item.metadata[:absolute_file_path]).to_i } + end + end + + # @private # Orders items based on a custom block. class Custom def initialize(callable) @@ -77,7 +85,8 @@ @configuration = configuration @strategies = {} - register(:random, Random.new(configuration)) + register(:random, Random.new(configuration)) + register(:recently_modified, RecentlyModified.new) identity = Identity.new register(:defined, identity) @@ -132,6 +141,8 @@ :random elsif order == 'defined' :defined + elsif order == 'recently-modified' + :recently_modified end register_ordering(:global, ordering_registry.fetch(ordering_name)) if ordering_name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/pending.rb new/lib/rspec/core/pending.rb --- old/lib/rspec/core/pending.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/pending.rb 2022-02-09 12:38:32.000000000 +0100 @@ -38,7 +38,7 @@ # @param message [String] optional message to add to the summary report. # # @example - # describe "an example" do + # describe "some behaviour" do # # reported as "Pending: no reason given" # it "is pending with no message" do # pending @@ -52,21 +52,13 @@ # end # end # - # @note `before(:example)` hooks are eval'd when you use the `pending` - # method within an example. If you want to declare an example `pending` - # and bypass the `before` hooks as well, you can pass `:pending => true` - # to the `it` method: - # - # it "does something", :pending => true do - # # ... - # end - # - # or pass `:pending => "something else getting finished"` to add a - # message to the summary report: - # - # it "does something", :pending => "something else getting finished" do - # # ... - # end + # @note When using `pending` inside an example body using this method + # hooks, such as `before(:example)`, have already be run. This means that + # a failure from the code in the `before` hook will prevent the example + # from being considered pending, as the example body would not be + # executed. If you need to consider hooks as pending as well you can use + # the pending metadata as an alternative, e.g. + # `it "does something", pending: "message"`. def pending(message=nil) current_example = RSpec.current_example diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/project_initializer/spec/spec_helper.rb new/lib/rspec/core/project_initializer/spec/spec_helper.rb --- old/lib/rspec/core/project_initializer/spec/spec_helper.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/project_initializer/spec/spec_helper.rb 2022-02-09 12:38:32.000000000 +0100 @@ -12,7 +12,7 @@ # the additional setup, and require it from the spec files that actually need # it. # -# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| # rspec-expectations config goes here. You can use an alternate # assertion/expectation library such as wrong or the stdlib/minitest @@ -61,9 +61,7 @@ # Limits the available syntax to the non-monkey patched syntax that is # recommended. For more details, see: - # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ - # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode + # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode config.disable_monkey_patching! # This setting enables warnings. It's recommended, but in some cases may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/version.rb new/lib/rspec/core/version.rb --- old/lib/rspec/core/version.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/version.rb 2022-02-09 12:38:32.000000000 +0100 @@ -3,7 +3,7 @@ # Version information for RSpec Core. module Version # Current version of RSpec Core, in semantic versioning format. - STRING = '3.10.1' + STRING = '3.11.0' end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/world.rb new/lib/rspec/core/world.rb --- old/lib/rspec/core/world.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core/world.rb 2022-02-09 12:38:32.000000000 +0100 @@ -10,6 +10,13 @@ # Used internally to determine what to do when a SIGINT is received. attr_accessor :wants_to_quit + # Used internally to signify that a SystemExit occurred in + # `Configuration#load_file_handling_errors`, and thus examples cannot + # be counted accurately. Specifically, we cannot accurately report + # "No examples found". + # @private + attr_accessor :rspec_is_quitting + # Used internally to signal that a failure outside of an example # has occurred, and that therefore the exit status should indicate # the run failed. @@ -18,6 +25,7 @@ def initialize(configuration=RSpec.configuration) @wants_to_quit = false + @rspec_is_quitting = false @configuration = configuration configuration.world = self @example_groups = [] @@ -184,10 +192,12 @@ return unless example_count.zero? example_groups.clear - if filter_manager.empty? - report_filter_message("No examples found.") - elsif exclusion_filter.empty? || inclusion_filter.empty? - report_filter_message(everything_filtered_message) + unless rspec_is_quitting + if filter_manager.empty? + report_filter_message("No examples found.") + elsif exclusion_filter.empty? || inclusion_filter.empty? + report_filter_message(everything_filtered_message) + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core.rb new/lib/rspec/core.rb --- old/lib/rspec/core.rb 2020-12-27 17:10:48.000000000 +0100 +++ new/lib/rspec/core.rb 2022-02-09 12:38:32.000000000 +0100 @@ -129,6 +129,32 @@ RSpec::Support.thread_local_data[:current_example] = example end + # Set the current scope rspec is executing in + # @api private + def self.current_scope=(scope) + RSpec::Support.thread_local_data[:current_scope] = scope + end + RSpec.current_scope = :suite + + # Get the current RSpec execution scope + # + # Returns (in order of lifecycle): + # * `:suite` as an initial value, this is outside of the test lifecycle. + # * `:before_suite_hook` during `before(:suite)` hooks. + # * `:before_context_hook` during `before(:context)` hooks. + # * `:before_example_hook` during `before(:example)` hooks and `around(:example)` before `example.run`. + # * `:example` within the example run. + # * `:after_example_hook` during `after(:example)` hooks and `around(:example)` after `example.run`. + # * `:after_context_hook` during `after(:context)` hooks. + # * `:after_suite_hook` during `after(:suite)` hooks. + # * `:suite` as a final value, again this is outside of the test lifecycle. + # + # Reminder, `:context` hooks have `:all` alias and `:example` hooks have `:each` alias. + # @return [Symbol] + def self.current_scope + RSpec::Support.thread_local_data[:current_scope] + end + # @private # Internal container for global non-configuration data. def self.world diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2020-12-27 17:10:48.000000000 +0100 +++ new/metadata 2022-02-09 12:38:32.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rspec-core version: !ruby/object:Gem::Version - version: 3.10.1 + version: 3.11.0 platform: ruby authors: - Steven Baker @@ -46,7 +46,7 @@ ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ F3MdtaDehhjC -----END CERTIFICATE----- -date: 2020-12-27 00:00:00.000000000 Z +date: 2022-02-09 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rspec-support @@ -54,14 +54,14 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: 3.10.0 + version: 3.11.0 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 3.10.0 + version: 3.11.0 - !ruby/object:Gem::Dependency name: cucumber requirement: !ruby/object:Gem::Requirement @@ -267,7 +267,7 @@ - MIT metadata: bug_tracker_uri: https://github.com/rspec/rspec-core/issues - changelog_uri: https://github.com/rspec/rspec-core/blob/v3.10.1/Changelog.md + changelog_uri: https://github.com/rspec/rspec-core/blob/v3.11.0/Changelog.md documentation_uri: https://rspec.info/documentation/ mailing_list_uri: https://groups.google.com/forum/#!forum/rspec source_code_uri: https://github.com/rspec/rspec-core @@ -287,8 +287,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.2.3 +rubygems_version: 3.3.3 signing_key: specification_version: 4 -summary: rspec-core-3.10.1 +summary: rspec-core-3.11.0 test_files: [] Binary files old/metadata.gz.sig and new/metadata.gz.sig differ