Sorry for the delayed response. I've managed to reproduce your error. I think it should be solved if you set the expectation on GoogleSearch instead of Object... GoogleSearch.any_instance.expects(:open) etc etc -- James. http://blog.floehopper.org