require 'clearance/testing/assertion_error'
require 'clearance/testing/deny_access_matcher'
require 'clearance/testing/helpers'

Clearance.configure do |config|
  config.password_strategy = Clearance::PasswordStrategies::Fake
end

if defined?(ActionController::TestCase)
  ActionController::TestCase.extend Clearance::Testing::Matchers

  class ActionController::TestCase
    include Clearance::Testing::Helpers
  end
end

if defined?(RSpec) && RSpec.respond_to?(:configure)
  RSpec.configure do |config|
    config.include Clearance::Testing::Matchers
    config.include Clearance::Testing::Helpers
  end
end

require 'clearance/testing/assertion_error'
require 'clearance/testing/deny_access_matcher'
require 'clearance/testing/helpers'

Clearance.configure do |config|
  config.password_strategy = Clearance::PasswordStrategies::Fake
end

if defined?(ActionController::TestCase)
  ActionController::TestCase.extend Clearance::Testing::Matchers

  class ActionController::TestCase
    include Clearance::Testing::Helpers
  end
end

if defined?(RSpec) && RSpec.respond_to?(:configure)
  RSpec.configure do |config|
    config.include Clearance::Testing::Matchers
    config.include Clearance::Testing::Helpers, :type => :controller
  end
end

Include certain helpers only for controller specs
Include certain helpers only for controller specs

Travis CI was failing because of the conflict between the `sign_out` method
meant for integration tests and the `sign_out` method used for controller specs.

Example failure: https://travis-ci.org/thoughtbot/clearance/jobs/4730477
