Skip to content

Instantly share code, notes, and snippets.

Created October 4, 2011 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1260887 to your computer and use it in GitHub Desktop.
Save anonymous/1260887 to your computer and use it in GitHub Desktop.
spec helper
require 'rubygems'
require 'spork'
Spork.prefork do
require 'simplecov'
SimpleCov.start
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require File.join(File.dirname(__FILE__), '../lib/existing_factory/existing_factory.rb')
require "paperclip/matchers"
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
config.mock_with :rspec
config.use_transactional_fixtures = true
end
end
Spork.each_run do
# This code will be run each time you run your specs.
SimpleCov.start
RSpec.configure do |config|
config.include Paperclip::Shoulda::Matchers
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment