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
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Standup 1/30/2012: It’s all about sharing

Jacob Maine
Monday, January 30, 2012

Interesting Things

  • should_not render_with_layout can be flaky. For example, asserting that an XHR request doesn’t have a layout could fail if the request renders an email template that does have a layout. These matchers are not very sophisticated, mostly doing string matching, not real template resolution.

Ask for Help

  • “How do I test relative time with FixtureBuilder?”

Since the models are all built beforehand, it’s tricky to write tests that make assertions about relative time. There were a variety of suggestions. You can write all the tests relative to a model: some_time.should == model.created_at - 3.days. You can wrap the entire suite and fixture generation in a Timecop block, but you’ll have to deal with losing that context whenever any test calls Timecop.return.

  • “How do I separate multiple FixtureBuilder files, but allow them to reference objects created in each other?”

Typically you want to separate fixtures into smaller files. But, you also often want to reference objects in other files, for example so you can assign a user from user_fixtures.rb to a post in post_fixtures.rb. One solution is to eval each file in a loop, so they can share instance variables. You can also use User.where(:name => "Tom") but that’s awkward and repetitive.

  • “Any suggestions for a CMS that would allow lots of different visual presentations of the content?”

The questioner is experimenting with branding. Not many suggestions… a shared database perhaps?

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Jacob Maine

Jacob Maine
Boston

Recent Posts

  • Standup 2012/2/1: Speed kills
  • Standup 2012/1/31: The bleeding edge
  • Standup 6/3/2011: Get your papers!
Subscribe to Jacob's Feed

Author Topics

agile (14)
testing (6)
rails (2)
prototype (2)
jruby (1)
hpricot (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • 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 >