diff --git a/spec/unit/azurerm_server_delete_spec.rb b/spec/unit/azurerm_server_delete_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/azurerm_server_delete_spec.rb
+++ b/spec/unit/azurerm_server_delete_spec.rb
@@ -17,8 +17,8 @@ describe Chef::Knife::AzurermServerDelete do
       @arm_server_instance.name_args = ['VM001']
 
       @server_detail = double('server', :name => "VM001", :hardware_profile => double, :storage_profile => double(:os_disk => double))
-      allow(@server_detail.hardware_profile).to receive_message_chain(:vm_size).and_return("10")
-      allow(@server_detail.storage_profile.os_disk).to receive_message_chain(:os_type).and_return("Linux")
+      allow(@server_detail.hardware_profile).to receive(:vm_size).and_return("10")
+      allow(@server_detail.storage_profile.os_disk).to receive(:os_type).and_return("Linux")
     end
 
     it "deletes server" do
Updated code logic and removed unused methods and specs related to azure
management gems