Skip to content

Instantly share code, notes, and snippets.

@dnagir
Created January 25, 2012 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dnagir/1674533 to your computer and use it in GitHub Desktop.
Save dnagir/1674533 to your computer and use it in GitHub Desktop.
The spec helper I use to run faster specs
ENV["RAILS_ENV"] ||= 'test'
cur_dir = File.expand_path(File.dirname(__FILE__) + '/..')
$LOAD_PATH << "#{cur_dir}"
if defined? Bundler
# Most likely going with the full env
require 'spec_helper'
else
$LOAD_PATH << "#{cur_dir}/app/models"
$LOAD_PATH << "#{cur_dir}/lib"
require 'spec/support/rspec'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment