Sha256: e6439bf19c5fe758fde13c9049bfac3fc151ede78037098d11b2acc44933d06f
Contents?: true
Size: 976 Bytes
Versions: 23
Compression:
Stored size: 976 Bytes
Contents
require 'generator_spec_helper' require_generator :cancan => :config LOGFILE = 'cancan_config.log' describe 'Generator' do use_helpers :controller, :special, :app, :directory, :file before :each do setup_generator 'config_generator' do tests Cancan::Generators::ConfigGenerator end end describe "Configure Rails 3 app for use with CanCan" do before do Dir.chdir Rails.root do @generator = with_generator do |g| arguments = "--logfile #{LOGFILE}".args g.run_generator arguments end end end it "should add cancan gems" do Rails.root.should have_gems 'cancan', 'cancan-rest-links' end it "should add CanCan rescue clause to ApplicationController" do Rails.root.should have_controller :application do |app_controller| puts app_controller app_controller.should match /rescue_from CanCan::AccessDenied/ end end end end
Version data entries
23 entries across 23 versions & 1 rubygems