title: NoMethodError: undefined method `RuntimeError'
body: <p>I wrote some code in a Ruby library (incidentally used in Rails) that raised a RuntimeError somewhat like below:</p>
  
  <pre><code>class MyClass
    def initialize(opts = {})
       # do stuff
       thing = opts[:thing]
       raise RuntimeError "must have a thing!" unless thing.present? &amp;&amp; thing.is_a?(Thing)
       # more stuff
    end
  end
  </code></pre>
  
  <p>and when I ran my fresh new rspec spec over it, which looks somewhat like:</p>
  
  <pre><code>it "should raise an error if we don't pass a thing" do
    lambda {
      my_class = MyClass.new(:thing =&gt; nil)
    }.should raise_exception(RuntimeError)
  end
  </code></pre>
  
  <p>I kept getting something weird:</p>
  
  <pre><code>expected RuntimeError, got 
  #&lt;NoMethodError: undefined method `RuntimeError' for #&lt;MyClass:0xb5acbf9c&gt;&gt;
  </code></pre>