Sha256: 163e8933caef63d58815c7e304f4a58d0319c3903a83baf6dd20e94b13f16e0d

Contents?: true

Size: 521 Bytes

Versions: 23

Compression:

Stored size: 521 Bytes

Contents

require 'spec_helper'

describe MyDashboard::ApplicationController do

  describe '#authentication_with_devise' do

    let(:models) { [:user, :admin] }

    before do
      MyDashboard.stub_chain(:config, :devise_allowed_models).and_return(models)
    end

    it 'calls devise authenticate method' do
      expect(controller).to receive("authenticate_#{models.first.to_s}!")
      expect(controller).to receive("authenticate_#{models.last.to_s}!")
      controller.send(:authentication_with_devise)
    end

  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_dashboard-0.8.6 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.8.5 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.8.4 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.8.3 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.8.1 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.8.0 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.7.2 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.7.1 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.7.0 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.6.0 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.10 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.9 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.8 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.7 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.6 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.5 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.4 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.3 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.2 spec/controllers/my_dashboard/application_controller_spec.rb
my_dashboard-0.5.1 spec/controllers/my_dashboard/application_controller_spec.rb