search for: lookup_things_on_the_web

Displaying 1 result from an estimated 1 matches for "lookup_things_on_the_web".

2011 Feb 16
3
stubbing gets undone?
...---- the model: class Premise << ActiveRecord::Base def lookup_stuff_on_the_web $stderr.puts("entering lookup_stuff_on_the_web with #{self}") ... end end ---- the rspec test file: describe Analysis do before(:each) do @premise = Factory(:premise) @premise.stub(:lookup_things_on_the_web) $stderr.puts("just stubbed #{@premise.inspect}") end it "should not hit the web" do @premise.lookup_things_on_the_web.should_not raise_exception end end ---- When I run the test, I see: just stubbed #<Premise id: 1, user_id: 1, ...> entering lookup_stuff_o...