Sha256: f82799a689c2f121fefe3ac1ca724e954247a1d427626c6dab2a5275d9f39ba6

Contents?: true

Size: 837 Bytes

Versions: 16

Compression:

Stored size: 837 Bytes

Contents

require 'clearance'

Clearance.configure do |config|
  # need an empty block to initialize the configuration object
end

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

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

class UserWithOptionalPassword < User
  private

  def password_optional?
    true
  end
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

16 entries across 16 versions & 1 rubygems

Version Path
clearance-1.7.0 spec/support/clearance.rb
clearance-1.6.1 spec/support/clearance.rb
clearance-1.6.0 spec/support/clearance.rb
clearance-1.5.1 spec/support/clearance.rb
clearance-1.5.0 spec/support/clearance.rb
clearance-1.4.3 spec/support/clearance.rb
clearance-1.4.2 spec/support/clearance.rb
clearance-1.4.1 spec/support/clearance.rb
clearance-1.4.0 spec/support/clearance.rb
clearance-1.3.0 spec/support/clearance.rb
clearance-1.2.1 spec/support/clearance.rb
clearance-1.2.0 spec/support/clearance.rb
clearance-1.1.0 spec/support/clearance.rb
clearance-1.0.1 spec/support/clearance.rb
clearance-1.0.0 spec/support/clearance.rb
clearance-1.0.0.rc8 spec/support/clearance.rb