title: Jasmine to test whether a object has a certain method or not
body: <p>I am using Jasmine, and I want to test whether a object has a certain method or not, like below:</p>
  
  <pre><code>it "should have 'open' method", -&gt;
      @xhr = ajax.create()
      expect(@xhr).toHaveMethod "open" # I want to test like this!
  </code></pre>
  
  <p>How can I test? Thanks for your kindness.</p>