Sha256: 39cace312620b65f67b3fc2aea90f737e26a95d0a131a260daaff3fae355284a
Contents?: true
Size: 1.4 KB
Versions: 4
Compression:
Stored size: 1.4 KB
Contents
require 'spec_helper' describe 'Crud actions options' do it 'Respond to all actions' do controller = AllActionsController.new controller.should respond_to :index controller.should respond_to :new controller.should respond_to :edit controller.should respond_to :create controller.should respond_to :update controller.should respond_to :destroy end it 'Respond only to index action' do controller = OnlyIndexController.new controller.should respond_to :index controller.should_not respond_to :new controller.should_not respond_to :edit controller.should_not respond_to :create controller.should_not respond_to :update controller.should_not respond_to :destroy end it 'Respond to all actions except index' do controller = ExceptIndexController.new controller.should_not respond_to :index controller.should respond_to :new controller.should respond_to :edit controller.should respond_to :create controller.should respond_to :update controller.should respond_to :destroy end it 'Respond to combination actions' do controller = OnlyAndExceptController.new controller.should respond_to :index controller.should respond_to :new controller.should_not respond_to :edit controller.should respond_to :create controller.should_not respond_to :update controller.should_not respond_to :destroy end end
Version data entries
4 entries across 4 versions & 1 rubygems