tap/test/test_helper.rb

31 lines
684 B
Ruby
Raw Normal View History

2015-03-03 20:11:50 +01:00
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
2015-03-03 16:03:59 +01:00
require 'coveralls'
Coveralls.wear!
2014-11-06 14:46:59 +01:00
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
2015-03-09 13:17:41 +01:00
require 'capybara/rails'
2014-11-06 14:46:59 +01:00
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
2015-03-09 13:17:41 +01:00
class ActionDispatch::IntegrationTest
include Warden::Test::Helpers
Warden.test_mode!
def sign_in(user)
login_as user, scope: :user
end
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
end