search for: each_result

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

Did you mean: ea_result
2007 Aug 12
5
stubbing a method that yeilds sequential results
...t get from a network service based on a set of attributes that I pass to it. I am wanting to yield these results from my Intermediate class up to the next ''level'' so the basic no frills set up would be this: class Intermediate def self.results(attributes) Connector.each_result(attributes) do |result| yield result end end end I''ve worked out how to stub things for the case where the Connector. each_result method yields a result once #setup @result = mock("result") Connector.stub!(:each_result).and_yield(@result) @attributes = {} @res...