Sorry for the confusion. spn and spna are the aliases that I have that add my no-rail code to the rspec boot path. They are nothing special except adding -I path_to_code on the command line.
These days I am adding something like this to my .rspec file:
-I app/mercury_app
Then I can do a simple require 'object_name' at the top of my specs.
As for not including spec_helper : it's true, I do not. When you execute your spec file with rspec <path_to_spec_file> , it is interpreted, so you do not need to explicitly specify rspec .
For my db specifications these days, I also created active_record_spec_helper , which requires active_record, establishes a connection to the test database and sets database_cleaner ; this allows me to simply require that my model be at the top of my spec file. This way I can check the AR code on db without loading the whole application.
The client I'm working on using these methods is interested in supporting some blog posts about this, so I hope they start appearing in mid-June.
coreyhaines
source share