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: 2/1/2010 – Speed up Paperclip tests; A fork of Spork that doesn't use fork

Justin Richard
Monday, February 1, 2010

Interesting

  • Speed up your tests that use Paperclip by putting the following in your spec_helper.rb. In a new project’s test suite this alone reduced the full suite run time from 25 to 5 seconds.
class Paperclip::Attachment
  def post_process; end
end
  • If you want to run Spork to speed up your tests, but aren’t running on a Ruby platform that supports Kernel.fork (like windows or JRuby) then Roger Pack’s Spork fork might work for you.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Andrew Cantino says:

    Thanks! That prevented convert from being run, but you can take it further and prevent identify from running as well:

    class Paperclip::Attachment
    def post_process; end
    end

    module Paperclip
    class << self
    def run(*args)
    “100×100″
    end
    end
    end

    March 11, 2010 at 5:31 pm

Add New Comment Cancel reply

Your email address will not be published.

Justin Richard

Justin Richard
San Francisco

Recent Posts

  • [Standup][SF] 11/07/12: CSS tech talk at AirBnB tonight
  • 5/18/12 Standup – Performance without downtime please
  • 5/15/12 Standup – setting the template in database.yml
Subscribe to Justin's Feed

Author Topics

agile (6)
  • 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 >