Sha256: 8efc31a0a8a43e2a470cf1de52db0f64ce896da7d31d2a51563feadca848890e
Contents?: true
Size: 973 Bytes
Versions: 3
Compression:
Stored size: 973 Bytes
Contents
require 'spec_helper' describe StatusCat::StatusController do routes { StatusCat::Engine.routes } describe '#index' do it 'gets successfully' do get :index response.should be_success end it 'assigns @checkers to StatusCat::Status.all' do get :index @checkers = assigns[ :checkers ] @checkers.should_not be( nil ) @checkers.length.should eql( StatusCat::Status.all.length ) @checkers.each { |checker| checker.should be_a_kind_of( StatusCat::Checkers::Base ) } end it 'uses the configured before authentication filter' do expect( @controller ).to receive( :instance_eval ).with( &StatusCat.config.authenticate_with ) expect( @controller ).to receive( :instance_eval ).with( &StatusCat.config.authorize_with ) get :index end it 'renders with the configured layout' do get :index expect( response ).to render_template( StatusCat.config.layout ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems