 <p>When you avoid of using the <code>with_message</code> method on the matcher then <a href="https://github.com/thoughtbot/shoulda-matchers/blob/d1e9a41fca001b6d89455aff49f1f03ac272ee08/lib/shoulda/matchers/active_model/validation_matcher.rb#L143" rel="nofollow">it uses default message</a>. </p> <p>To make your test works you should override the <a href="https://github.com/thoughtbot/shoulda-matchers/blob/d1e9a41fca001b6d89455aff49f1f03ac272ee08/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb#L265" rel="nofollow">matcher's default message</a>:</p> <pre><code>it { should validate_uniqueness_of(:name).with_message("has already been taken") } </code></pre>