I am trying to stub a method using sinon.js but I get the following error:
Uncaught TypeError: Attempted to wrap undefined property sample_pressure as function
Thanks to @loganfsmyth for the tip. I was able to get the stub to work on an Ember class method like this:
sinon.stub(Foo.prototype.constructor, 'find').returns([foo, foo]); expect(Foo.find()).to.have.length(2)