Skip to content

Instantly share code, notes, and snippets.

@dreamr
Created February 8, 2010 15:18
Show Gist options
  • Save dreamr/298224 to your computer and use it in GitHub Desktop.
Save dreamr/298224 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'spork'
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
require 'spec/autorun'
require 'spec/rails'
require 'remarkable_rails'
require 'faker'
require "authlogic/test_case"
require "email_spec"
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
end
Spork.each_run do
Dir.glob(File.join(File.dirname(__FILE__), '/spec_helpers/*_spec_helper.rb')).each {|f| require f }
Dir.glob(File.join(File.dirname(__FILE__), '/shared/*.rb')).each {|f| require f }
include ViewSpecHelper
include AuthenticationSpecHelper
include PaperclipSpecHelper
ActionMailer::Base.delivery_method = :test
ActionMailer::Base.default_url_options = { :host => "localhost:3000" }
Spec::Runner.configure do |config|
config.include EmailSpec::Helpers
config.include EmailSpec::Matchers
config.use_transactional_fixtures = true
config.before(:all) { }
config.before(:each) { reset_mailer ; activate_authlogic }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment