impressionist/tests/test_app/spec/spec_helper.rb

32 lines
582 B
Ruby
Raw Normal View History

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'
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
# make the rails logger usable in the tests as logger.xxx "..."
def logger
Rails.logger
end
2011-02-04 04:13:41 +00:00
end