Sha256: 4515f3132e0970a3d08f5d2e64d1459491eb6c7961b94fba537e9970472a7e42

Contents?: true

Size: 684 Bytes

Versions: 4

Compression:

Stored size: 684 Bytes

Contents

require 'clearance'

Clearance.configure do |config|
end

class ApplicationController < ActionController::Base
  include Clearance::Authentication
end

class User < ActiveRecord::Base
  include Clearance::User
end

module Clearance
  module Test
    module Redirects
      def redirect_to_url_after_create
        redirect_to(@controller.send(:url_after_create))
      end

      def redirect_to_url_after_update
        redirect_to(@controller.send(:url_after_update))
      end

      def redirect_to_url_after_destroy
        redirect_to(@controller.send(:url_after_destroy))
      end
    end
  end
end

RSpec.configure do |config|
  config.include Clearance::Test::Redirects
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clearance-1.0.0.rc4 spec/support/clearance.rb
clearance-1.0.0.rc3 spec/support/clearance.rb
clearance-1.0.0.rc2 spec/support/clearance.rb
clearance-1.0.0.rc1 spec/support/clearance.rb