Is it possible to stub a Kernel method? I'm specifically interested in
the 'open' method to test some code using open-uri. I've tried:

Kernel.should_receive(:open).with('filename').and_return('data')

However, this doesn't seem to work. Any suggestions would be appreciated.


--Paul
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to