Mock Kernel method

I use rspec on rails. I want to test model.

My model has this method:

class My
def self.blabla(url)
  open(url) {|f|

open is Kernel method. How do I mock it? Kernel.expects and
Kernel.should_receive and Kernel.stub! do no good.

To make it more clear, I am looking for something like this:
it "should processing" do
  My.blabla('').should == 'result of self.blabla'

I don't know if it's the same, but with Mocha you can do...


I hope that helps.

Yes, I have tried that in simple unit testing file. It works, but I
can not figure out integrate that with rspec on rails even using mocha.

Strange. Have you tried the rspec mailing list [1]?

Not yet. Maybe I should.