El 24/07/2010, a las 15:34, Lille escribió: > David, > > Yes, your reading of the request is what I originally meant. > > I appreciate the points made by others in this thread and the thread > David has referred to. > > As I continue to learn RSpec I will undoubtedly avail myself of the > approaches recommended above or in the linked thread, but I think an > argument to stub() per the following could be useful: > > f.stub(:barr, :throw_no_such_method_error=>true) > #=> Error: "The Foo class does not have a 'barr' method. Perhaps you > meant to stub 'bar'"
How about this: f.stub.existing(:bar) That's probably RR influencing me there, which employs things like "stub.proxy" and so on. So maybe not such a good idea for rspec-mocks. Cheers, Wincent _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users