File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
spec/puppet/resource_api/transport Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1010
1111 it 'will not throw an error' do
1212 allow ( File ) . to receive ( :exist? ) . and_return ( true )
13+ allow ( Hocon ) . to receive ( :load ) . and_call_original
1314 expect ( Puppet ::ResourceApi ::Transport ) . to receive ( :connect )
1415 expect ( Hocon ) . to receive ( :load ) . with ( '/etc/credentials' , any_args ) . and_return ( 'foo' => %w[ a b ] , 'bar' => 2 )
1516 expect { described_class . new ( 'wibble' , url ) } . not_to raise_error
2728 let ( :config ) { { } }
2829
2930 it 'will use the configuration directly' do
30- expect ( Hocon ) . not_to receive ( :load )
31+ allow ( Hocon ) . to receive ( :load ) . and_call_original
32+ expect ( Hocon ) . not_to receive ( :load ) . with ( '/etc/credentials' , any_args )
3133 expect ( Puppet ::ResourceApi ::Transport ) . to receive ( :connect )
3234 described_class . new ( 'wibble' , config )
3335 end
You can’t perform that action at this time.
0 commit comments