Skip to content

Instantly share code, notes, and snippets.

@ngw
Created March 13, 2011 19:36
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 ngw/868356 to your computer and use it in GitHub Desktop.
Save ngw/868356 to your computer and use it in GitHub Desktop.
ENV[ "RAILS_ENV" ] ||= 'test'
require File.expand_path( "../../config/environment", __FILE__ )
require 'rspec/rails'
require 'factory_girl'
require 'carrierwave/test/matchers'
require 'fakefs/spec_helpers'
Dir[ Rails.root.join( "spec/support/**/*.rb" ) ].each { |f| require f }
Dir[ Rails.root.join( "spec/factories/*.rb" ) ].each { |f| require f }
RSpec.configure do |config|
config.include Devise::TestHelpers, :type => :controller
config.include FakeFS::SpecHelper
config.mock_with :rspec
config.before :each do
Mongoid.master.collections.select { | c | c.name !~ /system/ }.each( &:drop )
end
OmniAuth.config.test_mode = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment