Rails controller spec helpers for warden
Ruby
Latest commit d44e129 Jan 23, 2016 @ajsharp Merge pull request #2 from mspanc/master
Updated helpers to work with RoR 4.1 & RSpec 3

README.md

What

Rails controller spec helpers for warden. If you're using warden without devise in rails, due to how action controller sets up the test environment, custom test setup code is necessary.

Usage

# Gemfile
group :test do
  gem 'warden-rspec-rails'
end

# spec_helper.rb
RSpec.configure do |c|
  c.include Warden::Test::ControllerHelpers, type: :controller

  def sign_in(user)
    warden.set_user(user)
  end
end

Thanks