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