2011-02-04 04:13:41 +00:00
|
|
|
ENV["RAILS_ENV"] ||= 'test'
|
2013-07-10 01:36:10 +00:00
|
|
|
|
2012-03-12 23:20:07 +00:00
|
|
|
unless ENV['CI']
|
|
|
|
require 'simplecov'
|
|
|
|
SimpleCov.start 'rails'
|
|
|
|
end
|
2013-07-10 01:36:10 +00:00
|
|
|
|
|
|
|
require File.
|
|
|
|
expand_path("../../config/environment", __FILE__)
|
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
require 'rspec/rails'
|
2013-07-06 19:20:35 +00:00
|
|
|
require 'capybara/rails'
|
2011-02-04 04:13:41 +00:00
|
|
|
|
2013-07-10 01:36:10 +00:00
|
|
|
# Custom matchers and macros, etc...
|
|
|
|
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f|
|
|
|
|
require f
|
|
|
|
}
|
2011-02-04 04:13:41 +00:00
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.mock_with :rspec
|
|
|
|
|
|
|
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
|
|
|
|
|
|
|
config.use_transactional_fixtures = true
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-11-07 19:41:51 +00:00
|
|
|
# make the rails logger usable in the tests as logger.xxx "..."
|
|
|
|
def logger
|
|
|
|
Rails.logger
|
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
end
|