diff --git a/lib/sambal/client.rb b/lib/sambal/client.rb
index <HASH>..<HASH> 100644
--- a/lib/sambal/client.rb
+++ b/lib/sambal/client.rb
@@ -124,7 +124,7 @@ module Sambal
 
     def rename(old_filename, new_filename)
       response = ask_wrapped 'rename', [old_filename, new_filename]
-      if response =~ /^renaming\sfile.*$/ # "renaming" reponse only exist if has error
+      if response =~ /renaming\sfile/ # "renaming" reponse only exist if has error
         Response.new(response, false)
       else
         Response.new(response, true)
diff --git a/spec/sambal/client_spec.rb b/spec/sambal/client_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/sambal/client_spec.rb
+++ b/spec/sambal/client_spec.rb
@@ -145,6 +145,10 @@ describe Sambal::Client do
       expect(@sambal_client.rename(TESTFILE, 'renamed_file.txt')).to be_successful
       expect(File.exists?(File.join(test_server.share_path, 'renamed_file.txt'))).to eq true
     end
+
+    it 'is unsuccessful when the file does not exist' do
+      expect(@sambal_client.rename('unknown_file.txt', 'renamed_file.txt')).not_to be_successful
+    end
   end
 
   it "should get files from an smb server" do
Add spec and correctly match error message for failed file rename