Skip to content

Instantly share code, notes, and snippets.

@diegorv
Created September 1, 2011 18:17
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 diegorv/1186843 to your computer and use it in GitHub Desktop.
Save diegorv/1186843 to your computer and use it in GitHub Desktop.
#require 'simplecov'
#SimpleCov.start 'rails'
require 'rubygems'
#require 'spork'
#Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
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
ActiveRecord::Base.establish_connection(Rails.configuration.database_configuration['test-in-memory'])
ActiveRecord::Schema.verbose = false
load_schema = lambda { load "#{Rails.root.to_s}/db/schema.rb" }
silence_stream(STDOUT, &load_schema)
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment