thoughtbot/suspenders — Issue #49: Include clearance test matchers
Author: croaky
Created: 2011-10-21 03:40:52+00:00
State: open

In `spec/support/clearance.rb`, I'd like:

require 'clearance/testing'

We'll then have access to methods like:

sign_in
sign_in_as(user)
sign_out

And matchers like:

deny_access

Example:

context "a visitor" do
before { get :show }
it { should deny_access }
end

context "a user" do
before do
sign_in
get :show
end

it { should respond_with(:success) }
end