title: RSpec custom diffable matcher
body: <p>I have a custom matcher in RSpec, that ignores whitespaces / newlines, and just matches content:</p>
  
  <pre><code>RSpec::Matchers.define :be_matching_content do |expected|
    match do |actual|
      actual.gsub(/\s/,'').should == expected.gsub(/\s/,'')
    end
  
    diffable
  end
  </code></pre>
  
  <p>I can use it like this:</p>
  
  <pre><code>    body = "   some data   \n more data"
      body.should be_matching_content("some data\nmore wrong data")
  </code></pre>
  
  <p>However, when a test fails (like the one above), the diff output looks not good:</p>
  
  <pre><code>   -some data
     -more wrong data
     +   some data   
     + more data
  </code></pre>
  
  <p>Is it possible to configure the diffable output? The first line <code>some data</code> is right, but the second <code>more wrong data</code> is wrong. It would be very useful, to only get the second line as the root cause of the failure.</p>