Sha256: 5512ffeb4f813308b0983cfc3580f2fc2c5c8e33f2eba7ca1a5e2ad0d8a23e2b
Contents?: true
Size: 1.02 KB
Versions: 23
Compression:
Stored size: 1.02 KB
Contents
require 'generator_spec_helper' require_generator :permits => :config LOGFILE = 'permits-config.log' describe 'Generator' do use_helpers :controller, :special, :file before :each do setup_generator :permits_config_generator do tests Permits::Generators::ConfigGenerator end end describe "Configure Rails 3 app for use with CanCan Permits" do before do puts "Running generator" Dir.chdir Rails.root do @generator = with_generator do |g| arguments = "--orm mongoid --logfile #{LOGFILE}".args g.run_generator arguments end end end describe 'result of permits generator' do it "should add the gem :cancan-permits" do # TODO Rails.root.should have_gem 'cancan-permits' end it "should generate a permits initializer file with orm set to mongoid" do File.read(initializer_file(:permits)).should match /Permits::Application.orm = :mongoid/ end end end end
Version data entries
23 entries across 23 versions & 1 rubygems