diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index e1b81b23d4b56c54432d3c0da809b1ebb9e89931..8aad1b73add203d4826fec1204b83b561db223c3 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -17,13 +17,13 @@
       before { allow(subject).to receive(:for_commit?).and_return(true) }
 
       it { is_expected.to validate_presence_of(:commit_id) }
-      it { is_expected.to_not validate_presence_of(:noteable_id) }
+      it { is_expected.not_to validate_presence_of(:noteable_id) }
     end
 
     context 'when note is not on commit' do
       before { allow(subject).to receive(:for_commit?).and_return(false) }
 
-      it { is_expected.to_not validate_presence_of(:commit_id) }
+      it { is_expected.not_to validate_presence_of(:commit_id) }
       it { is_expected.to validate_presence_of(:noteable_id) }
     end