[holy ruby programmers batman!] git/svn/patches?
Tim Connor
timocratic at gmail.com
Mon Dec 31 19:07:59 EST 2007
On Dec 31, 2007 3:49 PM, Giles Bowkett <gilesb at gmail.com> wrote:
> > > In the before(:each)
> > > Net::HTTP.stub!(:post_form).and_return(@page)
> >
> > To clarify, I musta missed a stub, if they fail without connection,
> > but I'm pretty sure the form post is covered. I'll check it h (turn
> > off my connection and test) when I do the other stuff, though.
>
> well, it's like this:
>
> Net::HTTP = mock('HTTP') unless Net.const_defined?('HTTP')
Yeah, but then later the stub! call *should* block the form post.
Basically I just needed to guarantee that Net:HTTP was defined. By my
understanding the stubbing should work wether it's a mock or the
actual http lib. I'll grab the latest copy, per your later email, and
fix it (with my wireless off), though.
More information about the Utilitybelt-tinkering
mailing list