Skip to content

Instantly share code, notes, and snippets.

@chischaschos
Created April 13, 2012 23:12
Show Gist options
  • Save chischaschos/2380725 to your computer and use it in GitHub Desktop.
Save chischaschos/2380725 to your computer and use it in GitHub Desktop.
18:26:18 guard.1 | /Users/emmanueldelgado/Projects/theproject/app/models/card.rb:54: warning: already initialized constant Fonts
require 'rubygems'
require 'spork'
require 'simplecov'
Spork.prefork do
SimpleCov.start 'rails'
# 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.
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'webmock/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}
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
end
WebMock.disable_net_connect!(:allow_localhost => true)
end
Spork.each_run do
load "#{Rails.root}/config/routes.rb"
Dir["#{Rails.root}/app/**/*.rb"].each {|f| load f}
Dir["#{Rails.root}/lib/**/*.rb"].each {|f| load f}
# This code will be run each time you run your specs.
RSpec.configure do |config|
# == Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
config.mock_with :rspec
config.use_transactional_fixtures = true
include CustomMatchers
include EmailSpec::Helpers
include EmailSpec::Matchers
# If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of
# rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment