stubbing

Mocking/Stubbing an Application Controller method with Mocha (Using Shoulda, Rails 3)

While writing functional tests for a controller, I came across a scenario where I have a before_filter requesting some information from the database that one of my tests requires. I'm using Factory_girl to generate test data but I want to avoid hitting the database when its not explicitly needed. I'd also like to avoid testing my before_...

Is it possible to create a stub for UIImagePickerController?

I am trying to write unit tests for a class that manages a UIImagePickerController. Yet, I still would like to link against UIKit to pull in other symbols I don't care about stubbing. Usually, I use OCMock for mocking out instance methods. With UIImagePickerController I'm interested in mocking out class methods which OCMock can't do. I'...