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 6/23/2010: Mock what isn't there

Matthew Kocher
Wednesday, June 23, 2010

Help

  • Is there a reason why java on 64 bit linux doesn’t seem to go above 4GB of ram even if it’s given more? Some docs say that 2GB is the max, which is clearly not the case. Other projects report they have JVMs as large as 12 gigs. The search for a reason for the OOM errors goes on.

  • How do you mock the backtick or array operator with RR? This is done in rspec by mocking the symbol on the class that it’s being called in, but it’s not obvious in RR. Suggestions included finding a different way to test the behavior, wrapping the system call in a function that’s easily mockable, or investigating another way to shell out.

Interesting

  • Free Ruler, the measurement tool of choice for pivots who need more than the pixels measurements of Command-Shift-4, doesn’t just know the pixel density of the display it’s running on. 20″ Aluminum iMacs are significantly different from what it assumes.

  • The Jasmine javascript BDD testing framework project was jealous of the newcomer Cedar’s @cedarbdd twitter. They’ve struck back by creating @jasminebdd. You can follow both for updates, announcements and tips.

  • Some devs working on a mobile JS app recently discovered Prototype’s wrap function after implementing the same thing many times before. They did preface this with “is anyone else still using Prototype” so as to not offend the jQuery zealots.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

3 Comments

  1. Matt says:

    For the java problem, is java 64-bit? It’s not enough to just run a java app on a 64-bit machine, you also need to have a 64-bit edition of the JVM.

    June 24, 2010 at 3:02 pm

  2. Ross Hale says:

    I ran into the backticks problem recently and found the solution here: http://blog.astrails.com/2010/7/5/how-to-mock-backticks-operator-in-your-test-specs-using-rr

    This is for the mocking framework RR.

    To stub ever backtick without an expectation: stub(@obj).__double_definition_create__.call(:`) { “…” }

    To add an expectation, pass in an argument:
    stub(@obj).__double_definition_create__.call(:`, “rake awesome”) { “…” }

    July 12, 2010 at 10:48 pm

  3. Rpss Hale says:

    Curse you markdown! That’s

    stub(@obj).double_definition_create.call(:`) { “…” }

    and

    stub(@obj).double_definition_create.call(:`, “rake awesome”) { “…” }

    July 12, 2010 at 10:50 pm

Add New Comment Cancel reply

Your email address will not be published.

Matthew Kocher

Matthew Kocher
San Francisco

Recent Posts

  • Did we git pair?
  • Service Oriented Foreman
  • 05/30/2012: Resque Me
Subscribe to Matthew's Feed

Author Topics

chef (5)
devops (3)
osx (1)
guiderails (1)
rails (1)
1.9.2 (1)
rvm (1)
amazon (3)
ec2 (3)
agile (3)
  • 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 >