Skip to content

Commit

Permalink
Fix stub deprecation warning
Browse files Browse the repository at this point in the history
Deprecation Warnings:

Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /workspace/spec/classes/storm/namespace.xml.erb_spec.rb:69:in `block (2 levels) in <top (required)>'.
  • Loading branch information
expuss2000 authored Oct 17, 2024
1 parent 6104742 commit 2fa53c1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/classes/storm/namespace.xml.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
end

before(:each) do
scope.stub(:lookupvar).with('storm::backend::storage_areas').and_return(storage_areas)
scope.stub(:lookupvar).with('storm::backend::gsiftp_pool_members').and_return(gsiftp_pool_members)
scope.stub(:lookupvar).with('storm::backend::webdav_pool_members').and_return(webdav_pool_members)
scope.stub(:lookupvar).with('storm::backend::fs_type').and_return(nil)
scope.stub(:lookupvar).with('storm::backend::xroot_hostname').and_return('storm.example.org')
scope.stub(:lookupvar).with('storm::backend::xroot_port').and_return(1094)
scope.stub(:lookupvar).with('storm::backend::gsiftp_pool_balance_strategy').and_return('round-robin')
scope.stub(:lookupvar).with('storm::backend::webdav_pool_balance_strategy').and_return('round-robin')
allow(scope).to receive(:lookupvar).with('storm::backend::storage_areas').and_return(storage_areas)
allow(scope).to receive(:lookupvar).with('storm::backend::gsiftp_pool_members').and_return(gsiftp_pool_members)
allow(scope).to receive(:lookupvar).with('storm::backend::webdav_pool_members').and_return(webdav_pool_members)
allow(scope).to receive(:lookupvar).with('storm::backend::fs_type').and_return(nil)
allow(scope).to receive(:lookupvar).with('storm::backend::xroot_hostname').and_return('storm.example.org')
allow(scope).to receive(:lookupvar).with('storm::backend::xroot_port').and_return(1094)
allow(scope).to receive(:lookupvar).with('storm::backend::gsiftp_pool_balance_strategy').and_return('round-robin')
allow(scope).to receive(:lookupvar).with('storm::backend::webdav_pool_balance_strategy').and_return('round-robin')
end

it 'render the same file each time' do
Expand Down

0 comments on commit 2fa53c1

Please sign in to comment.