Displaying 1 result from an estimated 1 matches for "lookup_stuff_on_the_web".
2011 Feb 16
3
stubbing gets undone?
I''m looking at an example where a stub seems to work sometimes, and
sometimes appears to become "unstubbed". I haven''t boiled it down to a
minimal example, but it goes something like this:
---- 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}"...