rspec-core 3.1.7 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.yardopts +1 -0
  5. data/Changelog.md +84 -0
  6. data/README.md +10 -1
  7. data/lib/rspec/core.rb +28 -8
  8. data/lib/rspec/core/backport_random.rb +12 -9
  9. data/lib/rspec/core/configuration.rb +350 -112
  10. data/lib/rspec/core/configuration_options.rb +14 -7
  11. data/lib/rspec/core/dsl.rb +7 -4
  12. data/lib/rspec/core/example.rb +86 -50
  13. data/lib/rspec/core/example_group.rb +247 -86
  14. data/lib/rspec/core/filter_manager.rb +38 -93
  15. data/lib/rspec/core/flat_map.rb +4 -4
  16. data/lib/rspec/core/formatters.rb +10 -6
  17. data/lib/rspec/core/formatters/base_formatter.rb +7 -4
  18. data/lib/rspec/core/formatters/base_text_formatter.rb +12 -12
  19. data/lib/rspec/core/formatters/console_codes.rb +8 -7
  20. data/lib/rspec/core/formatters/deprecation_formatter.rb +5 -3
  21. data/lib/rspec/core/formatters/documentation_formatter.rb +10 -4
  22. data/lib/rspec/core/formatters/helpers.rb +6 -4
  23. data/lib/rspec/core/formatters/html_formatter.rb +13 -8
  24. data/lib/rspec/core/formatters/html_printer.rb +26 -10
  25. data/lib/rspec/core/formatters/profile_formatter.rb +10 -7
  26. data/lib/rspec/core/formatters/protocol.rb +27 -18
  27. data/lib/rspec/core/formatters/snippet_extractor.rb +14 -7
  28. data/lib/rspec/core/hooks.rb +252 -211
  29. data/lib/rspec/core/memoized_helpers.rb +16 -16
  30. data/lib/rspec/core/metadata.rb +67 -28
  31. data/lib/rspec/core/metadata_filter.rb +151 -24
  32. data/lib/rspec/core/minitest_assertions_adapter.rb +5 -2
  33. data/lib/rspec/core/mocking_adapters/flexmock.rb +1 -1
  34. data/lib/rspec/core/mocking_adapters/mocha.rb +8 -8
  35. data/lib/rspec/core/notifications.rb +155 -94
  36. data/lib/rspec/core/option_parser.rb +16 -10
  37. data/lib/rspec/core/pending.rb +11 -9
  38. data/lib/rspec/core/project_initializer.rb +1 -1
  39. data/lib/rspec/core/project_initializer/spec/spec_helper.rb +10 -8
  40. data/lib/rspec/core/rake_task.rb +37 -52
  41. data/lib/rspec/core/reporter.rb +30 -7
  42. data/lib/rspec/core/ruby_project.rb +12 -4
  43. data/lib/rspec/core/runner.rb +5 -8
  44. data/lib/rspec/core/sandbox.rb +37 -0
  45. data/lib/rspec/core/shared_example_group.rb +41 -15
  46. data/lib/rspec/core/test_unit_assertions_adapter.rb +3 -3
  47. data/lib/rspec/core/version.rb +1 -1
  48. data/lib/rspec/core/warnings.rb +2 -2
  49. data/lib/rspec/core/world.rb +12 -28
  50. metadata +44 -31
  51. metadata.gz.sig +0 -0
@@ -25,9 +25,9 @@ module RSpec::Core
25
25
  OptionParser.new do |parser|
26
26
  parser.banner = "Usage: rspec [options] [files or directories]\n\n"
27
27
 
28
- parser.on('-I PATH', 'Specify PATH to add to $LOAD_PATH (may be used more than once).') do |dir|
28
+ parser.on('-I PATH', 'Specify PATH to add to $LOAD_PATH (may be used more than once).') do |dirs|
29
29
  options[:libs] ||= []
30
- options[:libs] << dir
30
+ options[:libs].concat(dirs.split(File::PATH_SEPARATOR))
31
31
  end
32
32
 
33
33
  parser.on('-r', '--require PATH', 'Require a file.') do |path|
@@ -59,7 +59,8 @@ module RSpec::Core
59
59
  options[:fail_fast] = false
60
60
  end
61
61
 
62
- parser.on('--failure-exit-code CODE', Integer, 'Override the exit code used when there are failing specs.') do |code|
62
+ parser.on('--failure-exit-code CODE', Integer,
63
+ 'Override the exit code used when there are failing specs.') do |code|
63
64
  options[:failure_exit_code] = code
64
65
  end
65
66
 
@@ -115,7 +116,8 @@ module RSpec::Core
115
116
  options[:color] = o
116
117
  end
117
118
 
118
- parser.on('-p', '--[no-]profile [COUNT]', 'Enable profiling of examples and list the slowest examples (default: 10).') do |argument|
119
+ parser.on('-p', '--[no-]profile [COUNT]',
120
+ 'Enable profiling of examples and list the slowest examples (default: 10).') do |argument|
119
121
  options[:profile_examples] = if argument.nil?
120
122
  true
121
123
  elsif argument == false
@@ -153,7 +155,8 @@ FILTERING
153
155
  options[:pattern] = o
154
156
  end
155
157
 
156
- parser.on('--exclude-pattern PATTERN', 'Load files except those matching pattern. Opposite effect of --pattern.') do |o|
158
+ parser.on('--exclude-pattern PATTERN',
159
+ 'Load files except those matching pattern. Opposite effect of --pattern.') do |o|
157
160
  options[:exclude_pattern] = o
158
161
  end
159
162
 
@@ -198,18 +201,21 @@ FILTERING
198
201
  exit
199
202
  end
200
203
 
201
- # these options would otherwise be confusing to users, so we forcibly prevent them from executing
202
- # --I is too similar to -I
203
- # -d was a shorthand for --debugger, which is removed, but now would trigger --default-path
204
+ # These options would otherwise be confusing to users, so we forcibly
205
+ # prevent them from executing.
206
+ #
207
+ # * --I is too similar to -I.
208
+ # * -d was a shorthand for --debugger, which is removed, but now would
209
+ # trigger --default-path.
204
210
  invalid_options = %w[-d --I]
205
211
 
206
212
  parser.on_tail('-h', '--help', "You're looking at it.") do
207
- # removing the blank invalid options from the output
213
+ # Removing the blank invalid options from the output.
208
214
  puts parser.to_s.gsub(/^\s+(#{invalid_options.join('|')})\s*$\n/, '')
209
215
  exit
210
216
  end
211
217
 
212
- # this prevents usage of the invalid_options
218
+ # This prevents usage of the invalid_options.
213
219
  invalid_options.each do |option|
214
220
  parser.on(option) do
215
221
  raise OptionParser::InvalidOption.new
@@ -1,9 +1,10 @@
1
1
  module RSpec
2
2
  module Core
3
- # Provides methods to mark examples as pending. These methods are available to be
4
- # called from within any example or hook.
3
+ # Provides methods to mark examples as pending. These methods are available
4
+ # to be called from within any example or hook.
5
5
  module Pending
6
- # Raised in the middle of an example to indicate that it should be marked as skipped.
6
+ # Raised in the middle of an example to indicate that it should be marked
7
+ # as skipped.
7
8
  class SkipDeclaredInExample < StandardError
8
9
  attr_reader :argument
9
10
 
@@ -12,8 +13,9 @@ module RSpec
12
13
  end
13
14
  end
14
15
 
15
- # If Test::Unit is loaded, we'll use its error as baseclass, so that Test::Unit
16
- # will report unmet RSpec expectations as failures rather than errors.
16
+ # If Test::Unit is loaded, we'll use its error as baseclass, so that
17
+ # Test::Unit will report unmet RSpec expectations as failures rather than
18
+ # errors.
17
19
  begin
18
20
  class PendingExampleFixedError < Test::Unit::AssertionFailedError; end
19
21
  rescue
@@ -71,7 +73,7 @@ module RSpec
71
73
  if block_given?
72
74
  raise ArgumentError, <<-EOS.gsub(/^\s+\|/, '')
73
75
  |The semantics of `RSpec::Core::Pending#pending` have changed in
74
- |RSpec 3. In RSpec 2.x, it caused the example to be skipped. In
76
+ |RSpec 3. In RSpec 2.x, it caused the example to be skipped. In
75
77
  |RSpec 3, the rest of the example is still run but is expected to
76
78
  |fail, and will be marked as a failure (rather than as pending) if
77
79
  |the example passes.
@@ -123,7 +125,7 @@ module RSpec
123
125
 
124
126
  # @private
125
127
  #
126
- # Mark example as skipped
128
+ # Mark example as skipped.
127
129
  #
128
130
  # @param example [RSpec::Core::Example] the example to mark as skipped
129
131
  # @param message_or_bool [Boolean, String] the message to use, or true
@@ -134,7 +136,7 @@ module RSpec
134
136
 
135
137
  # @private
136
138
  #
137
- # Mark example as pending
139
+ # Mark example as pending.
138
140
  #
139
141
  # @param example [RSpec::Core::Example] the example to mark as pending
140
142
  # @param message_or_bool [Boolean, String] the message to use, or true
@@ -152,7 +154,7 @@ module RSpec
152
154
 
153
155
  # @private
154
156
  #
155
- # Mark example as fixed
157
+ # Mark example as fixed.
156
158
  #
157
159
  # @param example [RSpec::Core::Example] the example to mark as fixed
158
160
  def self.mark_fixed!(example)
@@ -3,7 +3,7 @@ RSpec::Support.require_rspec_support "directory_maker"
3
3
  module RSpec
4
4
  module Core
5
5
  # @private
6
- # Generates conventional files for an rspec project
6
+ # Generates conventional files for an RSpec project.
7
7
  class ProjectInitializer
8
8
  attr_reader :destination, :stream, :template_path
9
9
 
@@ -1,14 +1,16 @@
1
1
  # This file was generated by the `rspec --init` command. Conventionally, all
2
2
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
5
6
  #
6
7
  # Given that it is always loaded, you are encouraged to keep this file as
7
8
  # light-weight as possible. Requiring heavyweight dependencies from this file
8
9
  # will add to the boot time of your test suite on EVERY test run, even for an
9
10
  # individual file that may not need all of that loaded. Instead, consider making
10
11
  # a separate helper file that requires the additional dependencies and performs
11
- # the additional setup, and require it from the spec files that actually need it.
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
12
14
  #
13
15
  # The `.rspec` file also contains a few flags that are not defaults but that
14
16
  # users commonly want.
@@ -22,10 +24,10 @@ RSpec.configure do |config|
22
24
  # This option will default to `true` in RSpec 4. It makes the `description`
23
25
  # and `failure_message` of custom matchers include text for helper methods
24
26
  # defined using `chain`, e.g.:
25
- # be_bigger_than(2).and_smaller_than(4).description
26
- # # => "be bigger than 2 and smaller than 4"
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
27
29
  # ...rather than:
28
- # # => "be bigger than 2"
30
+ # # => "be bigger than 2"
29
31
  expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
32
  end
31
33
 
@@ -48,8 +50,8 @@ RSpec.configure do |config|
48
50
  config.filter_run :focus
49
51
  config.run_all_when_everything_filtered = true
50
52
 
51
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
- # For more details, see:
53
+ # Limits the available syntax to the non-monkey patched syntax that is
54
+ # recommended. For more details, see:
53
55
  # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
56
  # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
57
  # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
@@ -1,71 +1,51 @@
1
1
  require 'rake'
2
2
  require 'rake/tasklib'
3
- require 'rbconfig'
3
+ require 'rspec/support/ruby_features'
4
4
 
5
5
  module RSpec
6
6
  module Core
7
- # Rspec rake task
7
+ # RSpec rake task
8
8
  #
9
9
  # @see Rakefile
10
10
  class RakeTask < ::Rake::TaskLib
11
11
  include ::Rake::DSL if defined?(::Rake::DSL)
12
12
 
13
- # Default path to the rspec executable
13
+ # Default path to the RSpec executable.
14
14
  DEFAULT_RSPEC_PATH = File.expand_path('../../../../exe/rspec', __FILE__)
15
15
 
16
16
  # Default pattern for spec files.
17
17
  DEFAULT_PATTERN = 'spec/**{,/*/**}/*_spec.rb'
18
18
 
19
- # Name of task.
20
- #
21
- # default:
22
- # :spec
19
+ # Name of task. Defaults to `:spec`.
23
20
  attr_accessor :name
24
21
 
25
22
  # Files matching this pattern will be loaded.
26
- #
27
- # default:
28
- # 'spec/**{,/*/**}/*_spec.rb'
23
+ # Defaults to `'spec/**{,/*/**}/*_spec.rb'`.
29
24
  attr_accessor :pattern
30
25
 
31
26
  # Files matching this pattern will be excluded.
32
- #
33
- # default:
34
- # 'spec/**/*_spec.rb'
27
+ # Defaults to `nil`.
35
28
  attr_accessor :exclude_pattern
36
29
 
37
- # Whether or not to fail Rake when an error occurs (typically when examples fail).
38
- #
39
- # default:
40
- # true
30
+ # Whether or not to fail Rake when an error occurs (typically when
31
+ # examples fail). Defaults to `true`.
41
32
  attr_accessor :fail_on_error
42
33
 
43
34
  # A message to print to stderr when there are failures.
44
35
  attr_accessor :failure_message
45
36
 
46
37
  # Use verbose output. If this is set to true, the task will print the
47
- # executed spec command to stdout.
48
- #
49
- # default:
50
- # true
38
+ # executed spec command to stdout. Defaults to `true`.
51
39
  attr_accessor :verbose
52
40
 
53
- # Command line options to pass to ruby.
54
- #
55
- # default:
56
- # nil
41
+ # Command line options to pass to ruby. Defaults to `nil`.
57
42
  attr_accessor :ruby_opts
58
43
 
59
- # Path to rspec
60
- #
61
- # default:
62
- # 'rspec'
44
+ # Path to RSpec. Defaults to the absolute path to the
45
+ # rspec binary from the loaded rspec-core gem.
63
46
  attr_accessor :rspec_path
64
47
 
65
- # Command line options to pass to rspec.
66
- #
67
- # default:
68
- # nil
48
+ # Command line options to pass to RSpec. Defaults to `nil`.
69
49
  attr_accessor :rspec_opts
70
50
 
71
51
  def initialize(*args, &task_block)
@@ -93,7 +73,7 @@ module RSpec
93
73
 
94
74
  return unless fail_on_error && !success
95
75
 
96
- $stderr.puts "#{command} failed"
76
+ $stderr.puts "#{command} failed" if verbose
97
77
  exit $?.exitstatus
98
78
  end
99
79
 
@@ -117,31 +97,36 @@ module RSpec
117
97
  elsif String === pattern && !File.exist?(pattern)
118
98
  "--pattern #{escape pattern}"
119
99
  else
120
- # Before RSpec 3.1, we used `FileList` to get the list of matched files, and
121
- # then pass that along to the `rspec` command. Starting with 3.1, we prefer to
122
- # pass along the pattern as-is to the `rspec` command, for 3 reasons:
100
+ # Before RSpec 3.1, we used `FileList` to get the list of matched
101
+ # files, and then pass that along to the `rspec` command. Starting
102
+ # with 3.1, we prefer to pass along the pattern as-is to the `rspec`
103
+ # command, for 3 reasons:
123
104
  #
124
- # * It's *much* less verbose to pass one `--pattern` option than a long list of files.
125
- # * It ensures `task.pattern` and `--pattern` have the same behavior.
126
- # * It fixes a bug, where `task.pattern = pattern_that_matches_no_files` would run
127
- # *all* files because it would cause no pattern or file args to get passed to `rspec`,
128
- # which causes all files to get run.
105
+ # * It's *much* less verbose to pass one `--pattern` option than a
106
+ # long list of files.
107
+ # * It ensures `task.pattern` and `--pattern` have the same
108
+ # behavior.
109
+ # * It fixes a bug, where
110
+ # `task.pattern = pattern_that_matches_no_files` would run *all*
111
+ # files because it would cause no pattern or file args to get
112
+ # passed to `rspec`, which causes all files to get run.
129
113
  #
130
- # However, `FileList` is *far* more flexible than the `--pattern` option. Specifically, it
131
- # supports individual files and directories, as well as arrays of files, directories and globs,
132
- # as well as other `FileList` objects.
114
+ # However, `FileList` is *far* more flexible than the `--pattern`
115
+ # option. Specifically, it supports individual files and directories,
116
+ # as well as arrays of files, directories and globs, as well as other
117
+ # `FileList` objects.
133
118
  #
134
- # For backwards compatibility, we have to fall back to using FileList if the user has passed
135
- # a `pattern` option that will not work with `--pattern`.
119
+ # For backwards compatibility, we have to fall back to using FileList
120
+ # if the user has passed a `pattern` option that will not work with
121
+ # `--pattern`.
136
122
  #
137
- # TODO: consider deprecating support for this and removing it in RSpec 4.
123
+ # TODO: consider deprecating support for this and removing it in
124
+ # RSpec 4.
138
125
  FileList[pattern].sort.map { |file| escape file }
139
126
  end
140
127
  end
141
128
 
142
- # Manaully comparing because in 3.2 we have RSpec::Support::OS.windows?
143
- # but in 3.1 we don't and requiring rspec/world would be weighty here.
144
- if RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/
129
+ if RSpec::Support::OS.windows?
145
130
  def escape(shell_command)
146
131
  "'#{shell_command.gsub("'", "\'")}'"
147
132
  end
@@ -162,7 +147,7 @@ module RSpec
162
147
  cmd_parts << RUBY
163
148
  cmd_parts << ruby_opts
164
149
  cmd_parts << rspec_load_path
165
- cmd_parts << rspec_path
150
+ cmd_parts << escape(rspec_path)
166
151
  cmd_parts << file_inclusion_specification
167
152
  cmd_parts << file_exclusion_specification
168
153
  cmd_parts << rspec_opts
@@ -14,11 +14,20 @@ module RSpec::Core
14
14
  # @private
15
15
  attr_reader :examples, :failed_examples, :pending_examples
16
16
 
17
- # Registers a listener to a list of notifications. The reporter will send notification of
18
- # events to all registered listeners
17
+ # @private
18
+ def reset
19
+ @examples = []
20
+ @failed_examples = []
21
+ @pending_examples = []
22
+ end
23
+
24
+ # Registers a listener to a list of notifications. The reporter will send
25
+ # notification of events to all registered listeners.
19
26
  #
20
- # @param listener [Object] An obect that wishes to be notified of reporter events
21
- # @param notifications [Array] Array of symbols represents the events a listener wishes to subscribe too
27
+ # @param listener [Object] An obect that wishes to be notified of reporter
28
+ # events
29
+ # @param notifications [Array] Array of symbols represents the events a
30
+ # listener wishes to subscribe too
22
31
  def register_listener(listener, *notifications)
23
32
  notifications.each do |notification|
24
33
  @listeners[notification.to_sym] << listener
@@ -61,6 +70,7 @@ module RSpec::Core
61
70
  @start = time
62
71
  @load_time = (@start - @configuration.start_time).to_f
63
72
  notify :start, Notifications::StartNotification.new(expected_example_count, @load_time)
73
+ notify :seed, Notifications::SeedNotification.new(@configuration.seed, seed_used?)
64
74
  end
65
75
 
66
76
  # @private
@@ -113,10 +123,12 @@ module RSpec::Core
113
123
  notify :dump_pending, Notifications::ExamplesNotification.new(self)
114
124
  notify :dump_failures, Notifications::ExamplesNotification.new(self)
115
125
  notify :deprecation_summary, Notifications::NullNotification
116
- notify :dump_summary, Notifications::SummaryNotification.new(@duration, @examples, @failed_examples, @pending_examples, @load_time)
117
126
  unless mute_profile_output?
118
- notify :dump_profile, Notifications::ProfileNotification.new(@duration, @examples, @configuration.profile_examples)
127
+ notify :dump_profile, Notifications::ProfileNotification.new(@duration, @examples,
128
+ @configuration.profile_examples)
119
129
  end
130
+ notify :dump_summary, Notifications::SummaryNotification.new(@duration, @examples, @failed_examples,
131
+ @pending_examples, @load_time)
120
132
  notify :seed, Notifications::SeedNotification.new(@configuration.seed, seed_used?)
121
133
  ensure
122
134
  notify :close, Notifications::NullNotification
@@ -138,7 +150,8 @@ module RSpec::Core
138
150
  private
139
151
 
140
152
  def mute_profile_output?
141
- # Don't print out profiled info if there are failures and `--fail-fast` is used, it just clutters the output
153
+ # Don't print out profiled info if there are failures and `--fail-fast` is
154
+ # used, it just clutters the output.
142
155
  !@configuration.profile_examples? || (@configuration.fail_fast? && @failed_examples.size > 0)
143
156
  end
144
157
 
@@ -146,4 +159,14 @@ module RSpec::Core
146
159
  @configuration.seed && @configuration.seed_used?
147
160
  end
148
161
  end
162
+
163
+ # @private
164
+ # # Used in place of a {Reporter} for situations where we don't want reporting output.
165
+ class NullReporter
166
+ private
167
+
168
+ def method_missing(*)
169
+ # ignore
170
+ end
171
+ end
149
172
  end
@@ -1,9 +1,6 @@
1
1
  # This is borrowed (slightly modified) from Scott Taylor's
2
2
  # project_path project:
3
3
  # http://github.com/smtlaissezfaire/project_path
4
-
5
- require 'pathname'
6
-
7
4
  module RSpec
8
5
  module Core
9
6
  # @private
@@ -29,8 +26,19 @@ module RSpec
29
26
  end
30
27
 
31
28
  def ascend_until
32
- Pathname(File.expand_path('.')).ascend do |path|
29
+ fs = File::SEPARATOR
30
+ escaped_slash = "\\#{fs}"
31
+ special = "_RSPEC_ESCAPED_SLASH_"
32
+ project_path = File.expand_path(".")
33
+ parts = project_path.gsub(escaped_slash, special).squeeze(fs).split(fs).map do |x|
34
+ x.gsub(special, escaped_slash)
35
+ end
36
+
37
+ until parts.empty?
38
+ path = parts.join(fs)
39
+ path = fs if path == ""
33
40
  return path if yield(path)
41
+ parts.pop
34
42
  end
35
43
  end
36
44
 
@@ -24,14 +24,15 @@ module RSpec
24
24
  next unless $!.nil? || $!.is_a?(SystemExit)
25
25
 
26
26
  # We got here because either the end of the program was reached or
27
- # somebody called Kernel#exit. Run the specs and then override any
27
+ # somebody called Kernel#exit. Run the specs and then override any
28
28
  # existing exit status with RSpec's exit status if any specs failed.
29
29
  invoke
30
30
  end
31
31
  @installed_at_exit = true
32
32
  end
33
33
 
34
- # Runs the suite of specs and exits the process with an appropriate exit code.
34
+ # Runs the suite of specs and exits the process with an appropriate exit
35
+ # code.
35
36
  def self.invoke
36
37
  disable_autorun!
37
38
  status = run(ARGV, $stderr, $stdout).to_i
@@ -105,12 +106,8 @@ module RSpec
105
106
  # failed.
106
107
  def run_specs(example_groups)
107
108
  @configuration.reporter.report(@world.example_count(example_groups)) do |reporter|
108
- begin
109
- hook_context = SuiteHookContext.new
110
- @configuration.hooks.run(:before, :suite, hook_context)
109
+ @configuration.with_suite_hooks do
111
110
  example_groups.map { |g| g.run(reporter) }.all? ? 0 : @configuration.failure_exit_code
112
- ensure
113
- @configuration.hooks.run(:after, :suite, hook_context)
114
111
  end
115
112
  end
116
113
  end
@@ -150,7 +147,7 @@ module RSpec
150
147
  trap('INT') do
151
148
  exit!(1) if RSpec.world.wants_to_quit
152
149
  RSpec.world.wants_to_quit = true
153
- STDERR.puts "\nExiting... Interrupt again to exit immediately."
150
+ STDERR.puts "\nRSpec is shutting down and will print the summary report... Interrupt again to force quit."
154
151
  end
155
152
  end
156
153
  end