Hi,

Is there a way that I can stub all the calls to a method except from the 
first one?

Example:

    class Book
      def foo
        "Book#foo()"
      end
    end

In spec:

    it 'x' do
      # .... (do something to stub all but the first method call to 
`Book#foo`)....

      b = Book.new
      expect(b.foo).to eq('Book#foo()') 
      expect(b.foo).to be_nil 
      expect(b.foo).to be_nil 
    end

Thanks in advance
Panayotis

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/7f733801-34aa-47a7-ba47-bba303fe9c34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to