Rails controller spec helpers for warden
Ruby
Switch branches/tags
Nothing to show
Clone or download
Latest commit 72aad20 Oct 5, 2017
Permalink
Failed to load latest commit information.
lib Add support for Rails 5 Sep 29, 2017
README.md update readme with sign_in method example Apr 6, 2013
warden-rspec-rails.gemspec initial commit Apr 6, 2013

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