File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ module Mutant
198
198
load_path : $LOAD_PATH,
199
199
marshal : Marshal ,
200
200
mutex : Mutex ,
201
+ object_space : ObjectSpace ,
201
202
open3 : Open3 ,
202
203
pathname : Pathname ,
203
204
process : Process ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class World
10
10
:load_path ,
11
11
:marshal ,
12
12
:mutex ,
13
+ :object_space ,
13
14
:open3 ,
14
15
:pathname ,
15
16
:process ,
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def matched_subjects
125
125
#
126
126
# @return [undefined]
127
127
def initialize_matchable_scopes
128
- scopes = ObjectSpace . each_object ( Module ) . each_with_object ( [ ] ) do |scope , aggregate |
128
+ scopes = world . object_space . each_object ( Module ) . each_with_object ( [ ] ) do |scope , aggregate |
129
129
expression = expression ( scope ) || next
130
130
aggregate << Scope . new ( scope , expression )
131
131
end
Original file line number Diff line number Diff line change 3
3
RSpec . describe Mutant ::Env ::Bootstrap do
4
4
let ( :integration ) { instance_double ( Mutant ::Integration ) }
5
5
let ( :integration_class ) { instance_double ( Class ) }
6
+ let ( :kernel ) { instance_double ( Object , 'kernel' ) }
6
7
let ( :load_path ) { %w[ original ] }
7
8
let ( :matcher_config ) { Mutant ::Matcher ::Config ::DEFAULT }
9
+ let ( :object_space ) { class_double ( ObjectSpace ) }
8
10
let ( :object_space_modules ) { [ ] }
9
- let ( :kernel ) { instance_double ( Object , 'kernel' ) }
10
11
11
12
let ( :world ) do
12
13
instance_double (
13
14
Mutant ::World ,
14
- kernel : kernel ,
15
- load_path : load_path ,
16
- pathname : Pathname
15
+ kernel : kernel ,
16
+ load_path : load_path ,
17
+ object_space : object_space ,
18
+ pathname : Pathname
17
19
)
18
20
end
19
21
@@ -60,7 +62,7 @@ def expect_warning
60
62
61
63
expect ( integration ) . to receive_messages ( setup : integration )
62
64
63
- expect ( ObjectSpace ) . to receive ( :each_object )
65
+ expect ( object_space ) . to receive ( :each_object )
64
66
. with ( Module )
65
67
. and_return ( object_space_modules . each )
66
68
end
You can’t perform that action at this time.
0 commit comments