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

  • Meet Sven: My AI Assistant
  • 7 habits of highly effective AI assistants
  • PRISM: Great answers to the hardest questions
  • Models, AI Systems, and Reasoning
  • Functional Programming is better than Object Oriented for AI code generation

Recent Comments

  • Adam on 7 habits of highly effective AI assistants
  • Dan Moore on 7 habits of highly effective AI assistants
  • Adam on 84 Quotes from the 4-Hour Workweek
  • Debbie on 84 Quotes from the 4-Hour Workweek
  • Chris Natale on Models, AI Systems, and Reasoning
Independent Publisher empowered by WordPress