Skip to content

Instantly share code, notes, and snippets.

@HeroicEric
Created October 17, 2011 14:36
Show Gist options
  • Select an option

  • Save HeroicEric/1292730 to your computer and use it in GitHub Desktop.

Select an option

Save HeroicEric/1292730 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'spork'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
config.mock_with :rspec
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.use_transactional_fixtures = true
end
end
Spork.each_run do
# This code will be run each time you run your specs.
FactoryGirl.reload
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment