rspec-core 3.0.4 → 3.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/.document +1 -1
- data/.yardopts +2 -1
- data/Changelog.md +888 -2
- data/{License.txt → LICENSE.md} +6 -5
- data/README.md +165 -24
- data/lib/rspec/autorun.rb +1 -0
- data/lib/rspec/core/backtrace_formatter.rb +19 -20
- data/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/lib/rspec/core/bisect/fork_runner.rb +138 -0
- data/lib/rspec/core/bisect/server.rb +61 -0
- data/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/lib/rspec/core/bisect/utilities.rb +69 -0
- data/lib/rspec/core/configuration.rb +1287 -246
- data/lib/rspec/core/configuration_options.rb +95 -35
- data/lib/rspec/core/did_you_mean.rb +46 -0
- data/lib/rspec/core/drb.rb +21 -12
- data/lib/rspec/core/dsl.rb +10 -6
- data/lib/rspec/core/example.rb +305 -113
- data/lib/rspec/core/example_group.rb +431 -223
- data/lib/rspec/core/example_status_persister.rb +235 -0
- data/lib/rspec/core/filter_manager.rb +86 -115
- data/lib/rspec/core/flat_map.rb +6 -4
- data/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/lib/rspec/core/formatters/base_formatter.rb +14 -116
- data/lib/rspec/core/formatters/base_text_formatter.rb +18 -21
- data/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/lib/rspec/core/formatters/console_codes.rb +29 -18
- data/lib/rspec/core/formatters/deprecation_formatter.rb +16 -16
- data/lib/rspec/core/formatters/documentation_formatter.rb +49 -16
- data/lib/rspec/core/formatters/exception_presenter.rb +525 -0
- data/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
- data/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/lib/rspec/core/formatters/helpers.rb +45 -15
- data/lib/rspec/core/formatters/html_formatter.rb +33 -28
- data/lib/rspec/core/formatters/html_printer.rb +30 -20
- data/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/lib/rspec/core/formatters/json_formatter.rb +18 -9
- data/lib/rspec/core/formatters/profile_formatter.rb +10 -9
- data/lib/rspec/core/formatters/progress_formatter.rb +5 -4
- data/lib/rspec/core/formatters/protocol.rb +182 -0
- data/lib/rspec/core/formatters/snippet_extractor.rb +113 -82
- data/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/lib/rspec/core/formatters.rb +81 -41
- data/lib/rspec/core/hooks.rb +314 -244
- data/lib/rspec/core/invocations.rb +87 -0
- data/lib/rspec/core/memoized_helpers.rb +161 -51
- data/lib/rspec/core/metadata.rb +132 -61
- data/lib/rspec/core/metadata_filter.rb +224 -64
- data/lib/rspec/core/minitest_assertions_adapter.rb +6 -3
- data/lib/rspec/core/mocking_adapters/flexmock.rb +4 -2
- data/lib/rspec/core/mocking_adapters/mocha.rb +11 -9
- data/lib/rspec/core/mocking_adapters/null.rb +2 -0
- data/lib/rspec/core/mocking_adapters/rr.rb +3 -1
- data/lib/rspec/core/mocking_adapters/rspec.rb +3 -1
- data/lib/rspec/core/notifications.rb +192 -206
- data/lib/rspec/core/option_parser.rb +174 -69
- data/lib/rspec/core/ordering.rb +48 -35
- data/lib/rspec/core/output_wrapper.rb +29 -0
- data/lib/rspec/core/pending.rb +25 -33
- data/lib/rspec/core/profiler.rb +34 -0
- data/lib/rspec/core/project_initializer/.rspec +0 -2
- data/lib/rspec/core/project_initializer/spec/spec_helper.rb +59 -39
- data/lib/rspec/core/project_initializer.rb +5 -3
- data/lib/rspec/core/rake_task.rb +99 -55
- data/lib/rspec/core/reporter.rb +128 -15
- data/lib/rspec/core/ruby_project.rb +14 -6
- data/lib/rspec/core/runner.rb +96 -45
- data/lib/rspec/core/sandbox.rb +37 -0
- data/lib/rspec/core/set.rb +54 -0
- data/lib/rspec/core/shared_example_group.rb +133 -43
- data/lib/rspec/core/shell_escape.rb +49 -0
- data/lib/rspec/core/test_unit_assertions_adapter.rb +4 -4
- data/lib/rspec/core/version.rb +1 -1
- data/lib/rspec/core/warnings.rb +6 -6
- data/lib/rspec/core/world.rb +172 -68
- data/lib/rspec/core.rb +66 -21
- data.tar.gz.sig +0 -0
- metadata +93 -69
- metadata.gz.sig +0 -0
- data/lib/rspec/core/backport_random.rb +0 -336
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
begin
|
|
2
|
-
# Only the minitest 5.x gem includes the minitest.rb and assertions.rb files
|
|
2
|
+
# Only the minitest 5.x gem includes the minitest.rb and assertions.rb files.
|
|
3
3
|
require 'minitest'
|
|
4
4
|
require 'minitest/assertions'
|
|
5
|
-
rescue LoadError
|
|
6
|
-
# We must be using Ruby Core's MiniTest or the Minitest gem 4.x
|
|
5
|
+
rescue LoadError
|
|
6
|
+
# We must be using Ruby Core's MiniTest or the Minitest gem 4.x.
|
|
7
7
|
require 'minitest/unit'
|
|
8
8
|
Minitest = MiniTest
|
|
9
9
|
end
|
|
@@ -13,6 +13,9 @@ module RSpec
|
|
|
13
13
|
# @private
|
|
14
14
|
module MinitestAssertionsAdapter
|
|
15
15
|
include ::Minitest::Assertions
|
|
16
|
+
# Need to forcefully include Pending after Minitest::Assertions
|
|
17
|
+
# to make sure our own #skip method beats Minitest's.
|
|
18
|
+
include ::RSpec::Core::Pending
|
|
16
19
|
|
|
17
20
|
# Minitest 5.x requires this accessor to be available. See
|
|
18
21
|
# https://github.com/seattlerb/minitest/blob/38f0a5fcbd9c37c3f80a3eaad4ba84d3fc9947a0/lib/minitest/assertions.rb#L8
|
|
@@ -10,10 +10,12 @@ module RSpec
|
|
|
10
10
|
module Flexmock
|
|
11
11
|
include ::FlexMock::MockContainer
|
|
12
12
|
|
|
13
|
-
def self.framework_name
|
|
13
|
+
def self.framework_name
|
|
14
|
+
:flexmock
|
|
15
|
+
end
|
|
14
16
|
|
|
15
17
|
def setup_mocks_for_rspec
|
|
16
|
-
# No setup required
|
|
18
|
+
# No setup required.
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
def verify_mocks_for_rspec
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
# hoops here.
|
|
3
3
|
#
|
|
4
4
|
# mocha >= '0.13.0':
|
|
5
|
-
# require 'mocha/api' is required
|
|
6
|
-
# require 'mocha/object' raises a LoadError b/c the file no longer exists
|
|
5
|
+
# require 'mocha/api' is required.
|
|
6
|
+
# require 'mocha/object' raises a LoadError b/c the file no longer exists.
|
|
7
7
|
# mocha < '0.13.0', >= '0.9.7'
|
|
8
|
-
# require 'mocha/api' is required
|
|
9
|
-
# require 'mocha/object' is required
|
|
8
|
+
# require 'mocha/api' is required.
|
|
9
|
+
# require 'mocha/object' is required.
|
|
10
10
|
# mocha < '0.9.7':
|
|
11
|
-
# require 'mocha/api' raises a LoadError b/c the file does not yet exist
|
|
12
|
-
# require 'mocha/standalone' is required
|
|
13
|
-
# require 'mocha/object' is required
|
|
11
|
+
# require 'mocha/api' raises a LoadError b/c the file does not yet exist.
|
|
12
|
+
# require 'mocha/standalone' is required.
|
|
13
|
+
# require 'mocha/object' is required.
|
|
14
14
|
begin
|
|
15
15
|
require 'mocha/api'
|
|
16
16
|
|
|
17
17
|
begin
|
|
18
18
|
require 'mocha/object'
|
|
19
19
|
rescue LoadError
|
|
20
|
-
# Mocha >= 0.13.0 no longer contains this file nor needs it to be loaded
|
|
20
|
+
# Mocha >= 0.13.0 no longer contains this file nor needs it to be loaded.
|
|
21
21
|
end
|
|
22
22
|
rescue LoadError
|
|
23
23
|
require 'mocha/standalone'
|
|
@@ -29,7 +29,9 @@ module RSpec
|
|
|
29
29
|
module MockingAdapters
|
|
30
30
|
# @private
|
|
31
31
|
module Mocha
|
|
32
|
-
def self.framework_name
|
|
32
|
+
def self.framework_name
|
|
33
|
+
:mocha
|
|
34
|
+
end
|
|
33
35
|
|
|
34
36
|
# Mocha::Standalone was deprecated as of Mocha 0.9.7.
|
|
35
37
|
begin
|