title: Why RSpec fails with TypeError when an expectation does't match?
body: <p>When I run <code>rspec</code> with an example that will pass, everything is fine.
  But when the expectation doesn't match I got a weird <code>TypeError</code> instead of a useful message about the difference between expected and actual value.</p>
  
  <p><strong>Given</strong></p>
  
  <ul>
  <li>ruby 2.3.1p112</li>
  <li>rspec 3.5.2</li>
  <li>a spec helper just as being generated by <code>rspec —init</code></li>
  </ul>
  
  <p><strong>When</strong> </p>
  
  <pre><code>describe "Basics" do
    it "runs rspec successfully" do
      x = true
      expect(x).to be(true)
    end
  end
  </code></pre>
  
  <p><strong>Then</strong> everything is fine</p>
  
  <pre><code>Finished in 0.00286 seconds (files took 0.09671 seconds to load)
  1 example, 0 failures
  </code></pre>
  
  <p><strong>BUT</strong> when I change x to false, thus the match fails</p>
  
  <p><strong>When</strong></p>
  
  <pre><code>describe "Basics" do
    it "runs rspec successfully" do
      x = false
      expect(x).to be(true)
    end
  end
  </code></pre>
  
  <p><strong>Then</strong></p>
  
  <pre><code>Failures:
  
    1) Basics runs rspec successfully
       Failure/Error: expect(x).to be(true)
  
       TypeError:   &lt;——— 
         superclass must be a Class (Module given)
       # ./spec/lib/basic_spec.rb:4:in `block (2 levels) in &lt;top (required)&gt;'
  
  Finished in 0.06168 seconds (files took 0.09715 seconds to load)
  1 example, 1 failure
  </code></pre>
  
  <p>I would expect an output like</p>
  
  <pre><code>  lhs: false
    rhs: true
  </code></pre>
  
  <p>instead of this TypeError.</p>
  
  <p>What's wrong here?</p>