File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 28
28
before ( :each ) do
29
29
allow ( File ) . to receive ( :exists? ) . with ( filename ) . and_return ( false ) . once
30
30
if Puppet ::PUPPETVERSION [ 0 ] . to_i < 8
31
- allow ( PSON ) . not_to receive ( :load )
31
+ allow ( PSON ) . to receive ( :load ) . never # rubocop:disable RSpec/ReceiveNever Switching to not_to receive breaks testing in this case
32
32
else
33
- allow ( JSON ) . not_to receive ( :parse )
33
+ allow ( JSON ) . to receive ( :parse ) . never # rubocop:disable RSpec/ReceiveNever
34
34
end
35
35
end
36
36
Original file line number Diff line number Diff line change 7
7
describe '#with_puppet' do
8
8
context 'without Puppet loaded' do
9
9
before ( :each ) do
10
- allow ( Module ) . to receive ( :const_get ) . with ( ' Puppet' ) . and_raise ( NameError )
10
+ allow ( Module ) . to receive ( :const_get ) . with ( : Puppet) . and_raise ( NameError )
11
11
end
12
12
13
13
it 'is nil' do
You can’t perform that action at this time.
0 commit comments