This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-31
lines changed
lib/rspec/core/mocking_adapters Expand file tree Collapse file tree 2 files changed +3
-31
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Breaking Changes:
23
23
` alias_it_should_behave_like_to ` configuration option. (Phil Pirozhkov, #2864 )
24
24
* Remove deprecated ` treat_symbols_as_metadata_keys_with_true_values ` configuration
25
25
option. (Phil Pirozhkov, #2864 )
26
+ * Remove support for Mocha version < 1.0. (Phil Pirozhkov, #2864 )
26
27
27
28
Enhancements:
28
29
Original file line number Diff line number Diff line change 1
- # In order to support all versions of mocha, we have to jump through some
2
- # hoops here.
3
- #
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.
7
- # mocha < '0.13.0', >= '0.9.7'
8
- # require 'mocha/api' is required.
9
- # require 'mocha/object' is required.
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.
14
- begin
15
- require 'mocha/api'
16
-
17
- begin
18
- require 'mocha/object'
19
- rescue LoadError
20
- # Mocha >= 0.13.0 no longer contains this file nor needs it to be loaded.
21
- end
22
- rescue LoadError
23
- require 'mocha/standalone'
24
- require 'mocha/object'
25
- end
1
+ require 'mocha/api'
26
2
27
3
module RSpec
28
4
module Core
@@ -33,12 +9,7 @@ def self.framework_name
33
9
:mocha
34
10
end
35
11
36
- # Mocha::Standalone was deprecated as of Mocha 0.9.7.
37
- begin
38
- include ::Mocha ::API
39
- rescue NameError
40
- include ::Mocha ::Standalone
41
- end
12
+ include ::Mocha ::API
42
13
43
14
def setup_mocks_for_rspec
44
15
mocha_setup
You can’t perform that action at this time.
0 commit comments