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.
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
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
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