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

SF Standup 9/16/2011: Schrodinger’s Cucumber

Onsi Fakhouri
Friday, September 16, 2011

Ask for Help

“I have a fresh install of Rails 3.1 and when I run specs with rake (with the development server running) it complains that the database is already in use.”

A chorus of replies: “I hate it when it says that.”

Looks like the test suite is trying to use the development DB. Try:

RAILS_ENV=test rake ...

It was pointed out that a call to rake that does not explicitly specify RAILS_ENV typically runs in development mode, detects that tests are being run, then switches to test mode. Any code that runs before the environment switch (in initializers, say) will run against the development DB.

“I have a large inherited cucumber suite that consistently fails on CI…. unless I screen share in and watch it. Why do I need to peek for my tests to pass?”

The likely answer: The very act of screen-sharing causes the test-suite to slow down. Use the setSpeed method in Selenium to force Selenium to take a breather between commands (the passed in value is in milliseconds).

Interesting Things

  • resque [ˈrɛsk] + JSON [jāsʌn] = surprise

    Ruby objects queued and dequeued by resque suffer a translation through JSON. What you put in may not be what you get out!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Onsi Fakhouri

Onsi Fakhouri
San Francisco

Recent Posts

  • Cocktail: DRY up your backbone code with mixins
  • Coccyx: plug up those backbone leaks
  • [SF] Standup 4/26/2012: Hush Terminal, Hush
Subscribe to Onsi's Feed

Author Topics

backbone (2)
javascript (2)
agile (12)
  • 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 >