@@ -66,7 +66,7 @@ def self.it_should_respond_to(*actions)
6666 it 'returns a list of npm packages installed globally' do
6767 provider . class . expects ( :execute ) .
6868 with ( [ '/usr/local/bin/npm' , 'list' , '--json' , '--global' ] , anything ) .
69- returns ( Puppet ::Util ::Execution ::ProcessOutput . new ( my_fixture_read ( ' npm_global') , 0 ) )
69+ returns ( Puppet ::Util ::Execution ::ProcessOutput . new ( File . read ( 'spec/fixtures/unit/puppet/provider/package/npm/ npm_global') , 0 ) )
7070 expect ( provider . class . instances . map ( &:properties ) . sort_by { |res | res [ :name ] } ) . to eq ( [
7171 { ensure : '2.5.9' , provider : 'npm' , name : 'express' } ,
7272 { ensure : '1.1.15' , provider : 'npm' , name : 'npm' }
@@ -76,7 +76,7 @@ def self.it_should_respond_to(*actions)
7676 it 'logs and continue if the list command has a non-zero exit code' do
7777 provider . class . expects ( :execute ) .
7878 with ( [ '/usr/local/bin/npm' , 'list' , '--json' , '--global' ] , anything ) .
79- returns ( Puppet ::Util ::Execution ::ProcessOutput . new ( my_fixture_read ( ' npm_global') , 123 ) )
79+ returns ( Puppet ::Util ::Execution ::ProcessOutput . new ( File . read ( 'spec/fixtures/unit/puppet/provider/package/npm/ npm_global') , 123 ) )
8080 Puppet . expects ( :debug ) . with ( regexp_matches ( %r{123} ) )
8181 expect ( provider . class . instances . map ( &:properties ) ) . not_to eq ( [ ] )
8282 end
0 commit comments