Adam Loving's Blog
Adam Loving's Blog
Seattle Software Engineer at Pioneer Square Labs
  • Facebook
  • Twitter
  • LinkedIn
Skip to content
  • About Adam

test driven development

There is one post tagged test driven development.

Q: How do you stub a method call for a rails unit test such that it returns a…

Q: How do you stub a method call for a rails unit test such that it returns a different value the second time it is called?

A:  stubs(:foo).returns(1,2)
returns 1 the first call, 2 the second, etc.

in Projects, Programming, Technology | 37 Words | Comment

Recent Posts

  • Best Minimal Deep Tech Breakdowns
  • RedwoodJS Reactions
  • Minimal Deep Tech Chord Stabs
  • What is Web 3.0?
  • What I learned from Battlesnake this summer

Recent Comments

  • Ekwanomi on Best Minimal Deep Tech Breakdowns
  • Adam on Minimal Deep Tech Chord Stabs
  • Adam on Python Truthiness and Truth Table
  • John Private on Python Truthiness and Truth Table
  • John Private on Python Truthiness and Truth Table
Independent Publisher empowered by WordPress