File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
lib/metasploit/framework/login_scanner Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 117
117
end
118
118
119
119
before :each do
120
- allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |req |
120
+ allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |cli , req |
121
121
if req . opts [ 'uri' ] && req . opts [ 'uri' ] . include? ( 'j_security_check' ) &&
122
122
req . opts [ 'data' ] &&
123
123
req . opts [ 'data' ] . include? ( "j_username=#{ username } " ) &&
157
157
end
158
158
159
159
before :each do
160
- allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |req |
160
+ allow_any_instance_of ( Rex ::Proto ::Http ::Client ) . to receive ( :send_recv ) do |cli , req |
161
161
if req . opts [ 'uri' ] && req . opts [ 'uri' ] . include? ( 'j_security_check' ) &&
162
162
req . opts [ 'data' ] &&
163
163
req . opts [ 'data' ] . include? ( "j_username=#{ username } " ) &&
Original file line number Diff line number Diff line change 29
29
end
30
30
31
31
RSpec . configure do |config |
32
- config . mock_with :rspec
32
+ config . mock_with :rspec do |mocks |
33
+ mocks . yield_receiver_to_any_instance_implementation_blocks = true
34
+ end
33
35
34
36
# Run specs in random order to surface order dependencies. If you find an
35
37
# order dependency and want to debug it, you can fix the order by providing
You can’t perform that action at this time.
0 commit comments