Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Standup for St. Patrick's Day

Sarah Mei
Wednesday, March 17, 2010

Help:

  • Testing blocks. If you have a block and you want to spy on the internals as it executes, what do you do? Suggestions were:
    • Have each method called internally throw a symbol and check for that.
    • Turn it into a proc, and set expectations on that.
    • Stub the methods being called internally and set expectations on those.
    • pass the block to a spy object.

Other suggestions welcome. The project is using rr, which apparently can’t do this last option, though that would be ideal.

  • Routes in Rails are case-sensitive? /products/1/edit and /Products/1/edit don’t both resolve to the same place (unless you specify in routes.rb). Rumor has it that the RFC for URIs says that the path portion of a URL is case-sensitive, as opposed to the case-insensitive domain name.

If anyone wants to read through that document and confirm…feel free.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Alex Sharp says:

    In general, my opinion is that there is no reason to “test” the internals of something, as long as it returns what you expect, that should be sufficient. However, if you need to spy on the block for other reasons (performance, profiling) maybe try memprof. Not sure what the current state is on OS X, but it gives a lot of really helpful feedback on what ruby is doing.

    March 21, 2010 at 10:43 am

Add New Comment Cancel reply

Your email address will not be published.

Sarah Mei

Sarah Mei
San Francisco

Recent Posts

  • Standup 11/5/2010: Happy Friday Edition
  • Standup 11/4/2010: sweeping-up-the-ticker-tape edition
  • Oh look a parade!
Subscribe to Sarah's Feed

Author Topics

agile (7)
arel (1)
bundler (2)
cimonitor (1)
heroku (1)
git (2)
jasmine (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >