Any success with stubbing Net::HTTP::get?

I found this link the other day, re: how to stub out Net::HTTP::get and
just about flipped it was so cool: This is
exactly what I needed and allowed me to right even more happy model

I made an http.rb in my test/mocks/test directory and added the
suggested require line in my model_test.rb file.

Now, he didn’t give the details on what the fixture should look like.
No matter. I gave it a try anyway.

And when I run ruby test/unit/model_test.rb I’m getting errors from
/usr/lib/ruby/1.8/net/http.rb instead of from my stub file.

I’m calling get from model.rb, naturally, and it (model.rb) has require
‘net/http’. So this seems like a dependency problem. Thoughts?


Never mind. User error. I guess I had a hair trigger today.