Is there a way to warn but not fail if a particular method wasn't
called? That is, I'm looking for something that's halfway between
obj.stub(...) and obj.should_receive(...). I'm trying to do something
like this:

shared_context "with a stubbed geocoder" do
  before(:each) do
    @geocoding_client = Geocoding::FakeGeoClient.new

    # generate warning if the spec doesn't cause a hit to Geocoding.client
    Geocoding.warn_if_not_received(:client).and_return(@geocoding_client)
  end
end

~ jf
--
John Feminella
Principal Consultant, BitsBuilder
LI: http://www.linkedin.com/in/johnxf
SO: http://stackoverflow.com/users/75170/
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to