Vijay's blog
Interesting Things
- Rspec - stubbing a class method
In Rspec you can stub a class method in a module using Module::Class:Stubs('method') similar to Mocha syntax stub! does not work for Module::Class:method in rspec
- Rspec - running test in order
If someone knows of a way to run describes in order in rspec test, please let me know
Ask for Help
"Finder conditions in rails?"
find(:all, :conditions => 'flag is null') where flag is boolean
This would work in tests but not in development mode. They tried changing it to
find(:all, :conditions => 'flag != 1') where flag is boolean
and this would work in dev mode but not in test.
Try having boolean values in database as not null and never pass null to boolean. Make sure fixtures and development data have similar data sets.
"Selenium tests failing to load associations"
Check if you RAILS_ENV is set to test while running Selenium. There has been some cases of weird rails behavior running tests when RAILS_ENV is set to development
Interesting Things
One of the teams was trying to reopen the
Timeclass to maketo_datepublic. Another pivot noticed that there is no built into_dateinTimeclass in ruby.ActiveSupporthas ato_datemethod onTimeclass that is public. The most interesting one is that there is a privateto_datethat is added toTimeclass when you include Yaml.We have git brown bag today on how to use git with the Pivotal Process.
Other stuff
- We are looking for one more unix system administrator preferably with scalability experience to help with our infrastructure. The job description is here. Well there are obvious benefits and then there is also free breakfast :)
Interesting Things
svn logtakes a long time when you have recently committed a large number such as 5000 files. Specifically, this happens when you have path based security. Here's a link from the subversion documentation that mentions thisAll of this path-checking can sometimes be quite expensive, especially in the case of svn log. When retrieving a list revisions, the server looks at every changed path in each revision and checks it for readability. If an unreadable path is discovered, then it's omitted from the list of the revision's changed paths (normally seen with the --verbose option), and the whole log message is suppressed. Needless to say, this can be time-consuming on revisions that affect a large number of files
Check out the new links at pivotallabs.com
- Talks lists all the tech talks that happen here at Pivotal such as Blaine Cook's Fire Eagle talk. If you have some cool technology and would like to give a talk, contact us at techtalks@pivotallabs.com
- Who lists all the great people who work here







