2013-11-11 12:22:48 -05:00
|
|
|
require 'coveralls'
|
|
|
|
|
|
|
|
# Enable Coveralls
|
|
|
|
Coveralls.wear!
|
|
|
|
|
2011-02-05 08:32:10 -05:00
|
|
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
|
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2012-05-17 09:06:45 -04:00
|
|
|
|
2012-05-22 17:52:50 -04:00
|
|
|
begin
|
|
|
|
require 'rails'
|
|
|
|
rescue LoadError
|
|
|
|
end
|
|
|
|
|
2012-05-17 09:06:45 -04:00
|
|
|
require 'bundler/setup'
|
|
|
|
Bundler.require
|
|
|
|
|
2012-11-26 08:43:59 -05:00
|
|
|
require 'capybara/rspec'
|
2011-04-02 01:27:28 -04:00
|
|
|
require 'database_cleaner'
|
2012-05-20 10:30:19 -04:00
|
|
|
|
|
|
|
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
|
|
|
|
require 'fake_gem' if defined? ActiveRecord
|
|
|
|
|
2012-05-22 17:52:50 -04:00
|
|
|
if defined? Rails
|
2012-05-22 23:48:07 -04:00
|
|
|
require 'fake_app/rails_app'
|
2012-05-22 17:52:50 -04:00
|
|
|
|
|
|
|
require 'rspec/rails'
|
|
|
|
end
|
|
|
|
if defined? Sinatra
|
|
|
|
require 'spec_helper_for_sinatra'
|
|
|
|
end
|
2011-02-05 08:54:09 -05:00
|
|
|
|
2011-02-05 08:32:10 -05:00
|
|
|
# Requires supporting files with custom matchers and macros, etc,
|
|
|
|
# in ./support/ and its subdirectories.
|
|
|
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
2011-02-05 08:54:09 -05:00
|
|
|
config.mock_with :rr
|
2011-02-05 08:32:10 -05:00
|
|
|
end
|