Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7980585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:07:11+00:00 2026-06-04T10:07:11+00:00

In this video from GoGaRuCo 2011 , Corey Haines shows some techniques for making

  • 0

In this video from GoGaRuCo 2011, Corey Haines shows some techniques for making Rails test suites much faster. I would summarize it as follows:

  • Put as much of your code as possible outside the Rails app, into other modules and classes
  • Test those separately, without the overhead of loading up Rails
  • Use them from within your Rails app

There were a couple of things I didn’t understand, though.

  • He alternates between running tests with rspec and spn or spna (for example, at about 3:50). Is spn a commonly-known tool?
  • In his tests for non-Rails classes and modules, he includes the module or class being tested, but I don’t see him including anything like spec_helper. How does he have Rspec available?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:07:12+00:00Added an answer on June 4, 2026 at 10:07 am

    Sorry about the confusion. spn and spna are aliases I have that add my non-rails code to rspec’s load path. There isn’t anything special about them, other than adding a -I path_to_code on the command-line.

    These days, I add something like this to my .rspec file:

    -I app/mercury_app
    

    Then I can do simple require 'object_name' at the top of my specs.

    As for not including spec_helper: that is true, I don’t. When you execute your spec file with rspec <path_to_spec_file>, it gets interpreted, so you don’t need to require rspec explicitly.

    For my db specs these days, I also have built an active_record_spec_helper which requires active_record, establishes a connection to the test database, and sets up database_cleaner; this allows me to simply require my model at the top of my spec file. This way, I can test the AR code against the db without having to load up my whole app.

    A client I am working at where we are using these techniques is interested in supporting some blog posts about this, so hopefully they will start coming out towards the middle of June.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've watched this video from Google I/O 2009: http://www.youtube.com/watch?v=AgaL6NGpkB8 where Brett shows microblogging example.
In this video from Google I/O 2011, Google says you can use the Android
In this video, taken from Stanford's CS107 lecture, the professor seems to state that
I'm trying to play video from youtube using this code but I get this
I'd like to remove the popup message 'Sorry this video cannot be played' from
I'm trying to get the video data from this youtube playlist feed and add
I found this code snippet to retrieve the title from a YouTube video and
Introduction After watching this video from LIDNUG, about .NET code protection http://secureteam.net/lidnug_recording/Untitled.swf (especially from
I am using this code to download video from you tube (it is a
I'm trying to encode a video from an IGraphBuilder, for this I would require

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.