Sarah Mei's blog



Sarah MeiSarah Mei
Standup for St. Patrick's Day
edit Posted by Sarah Mei on Wednesday March 17, 2010 at 09:23AM

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.

Sarah MeiSarah Mei
Standup 3/16/2010
edit Posted by Sarah Mei on Tuesday March 16, 2010 at 09:14AM

Help

Interesting

  • The on302 callback is a myth! One team discovered that if you set a 302 (redirect) callback for an AJAX call, like in Prototype, the redirect is followed by the browser and the callback is never called. Suggestions: hack the library so that if the response URL doesn't equal the request URL, call the on302. Or do that in your application Javascript.

Sarah MeiSarah Mei
Standup for the Ides of March
edit Posted by Sarah Mei on Monday March 15, 2010 at 09:16AM

Help

  • One team is starting to use Sunspot and is curious about testing strategies. Sunspot provides a method that stubs out the backend, but search blocks aren't executed, so it's hard to test actual searching.

  • Objective C needs a BDD framework. How does Xcode magically know about OCunit? We need to hook in there to have a usable framework.

Interesting

  • Mountain West Ruby Conf was awesome.