Sha256: cf81d59fc51dc5f42adcc83315ab98e3824ebec51225c368e4b89efeeb6a54b2

Contents?: true

Size: 513 Bytes

Versions: 18

Compression:

Stored size: 513 Bytes

Contents

require 'spec_helper'

describe Dashing::ApplicationController do

  describe '#authentication_with_devise' do

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

    before do
      Dashing.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

18 entries across 18 versions & 1 rubygems

Version Path
dashing-rails-2.5.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.5 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.4 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.3 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.2 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.1 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.4.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.3.2 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.3.1 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.3.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.2.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.1.1 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.1.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.0.2 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.0.1 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-2.0.0 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-1.0.3 spec/controllers/dashing/application_controller_spec.rb
dashing-rails-1.0.2 spec/controllers/dashing/application_controller_spec.rb