Re: [rspec-users] why should_receive doesn't work, but stub does.

2009-07-14 Thread David Chelimsky
On Tue, Jul 14, 2009 at 4:49 AM, Zhenning Guan wrote: >  before(:each) do >     @myinstance = GetHtml.new >  end > >  it "should be a Hyricot" do >    hy = open('test.html') {|f| Hpricot f} >   > �...@myinstance.should_receive(:find_html).with("file:///test_url").and_return(hy) > >  end >

[rspec-users] why should_receive doesn't work, but stub does.

2009-07-14 Thread Zhenning Guan
before(:each) do @myinstance = GetHtml.new end it "should be a Hyricot" do hy = open('test.html') {|f| Hpricot f} @myinstance.should_receive(:find_html).with("file:///test_url").and_return(hy) end ++ it "should be a Hyricot" do hy = o