title: Action mailer link check in rspec
body: <p>I have in my rspec test such comparison: </p>
  
  <pre><code>expect(new_mail.body.encoded).to match(url_for(controller:'some_controller',action:'some_action',some_param:some_param))
  </code></pre>
  
  <p>but it fails because ActionMailer encodes html body to something like this:</p>
  
  <pre><code>   +&lt;a href=3D"http://localhost:3000/some_controller/some_action/wgt1p468ersmkq=
     +gbvmfv5wgmifj13u894dfjrhc0hzczk71pcw3hrk5907iqfolc6onhxvik6apuuwgm1rng7ro=
     +rt8qih43thql3spyp5ajjdugy9jvx0xc5hvpi015z" style=3D"display: inline-block=
     +; background-color: #71B344; color: #FFF; border-radius: 4px; font-weight=
     +: bold; text-decoration: none; padding: 6px 12px; white-space: nowrap"&gt;
     +        Go to Your Account
     +      &lt;/a&gt;
  </code></pre>
  
  <p>how to compare expected link and encoded link in mail body?</p>