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 11/29/12: Time.now, more like Time.at(2011)

Charles Hansen
Thursday, November 29, 2012

Helps

mock object nil when it shouldn’t be

(rdb:1) @registration

RSpec::Mocks::Mock:0x3fda7eabfd68 @name=”mocked registration”

(rdb:1) @registration.present?
false
(rdb:1) @registration.nil?
false

  • mock objects don’t always define nil? or present?

Interestings

David Chelimsky handing off rspec

David Chelmisky is stepping down as the RSpec lead after 6+ years. http://blog.davidchelimsky.net/2012/11/28/myron-marston-and-andy-lindeman-are-rspecs-new-project-leads/

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Doc Ritezel says:

    Dmitriy had a help this morning relating to this error coming from a Resque job:

    PG::Error: ERROR: prepared statement “a1″ already exists (ActiveRecord::StatementInvalid):
    SELECT COUNT(*)
    FROM pg_class c
    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
    WHERE c.relkind in (‘v’,'r’)
    AND c.relname = $1
    AND n.nspname = ANY (current_schemas(false))

    Turns out this is actually a point of discussion on the Github page for Rails: [https://github.com/rails/rails/pull/5872](https://github.com/rails/rails/pull/5872)

    We found that, just as in the comments for this issue, adding the following to our Rakefile was the solution:

    task “resque:setup” => :environment do
    Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
    end

    November 29, 2012 at 10:54 am

Add New Comment Cancel reply

Your email address will not be published.

Charles Hansen

Charles Hansen
San Francisco

Recent Posts

  • Launching Focused Jasmine Specs From RubyMine
  • Standup 11/28/12: Mohawk Day!
  • Standup 11/26/12
Subscribe to Charles's Feed

Author Topics

jasmine (1)
rubymine (1)
agile (5)
backbone (1)
javascript (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 >