Sha256: 9428ae8e8dbe4d7f4233fe2b88100b9d336b010e2e0317d78f9fa91415bfb6ee

Contents?: true

Size: 865 Bytes

Versions: 3

Compression:

Stored size: 865 Bytes

Contents

require 'spec_helper' 
require 'generator-spec'

require_generator :cantango => :role_permit

RSpec::Generator.configure do |config|
  config.debug = true
  config.remove_temp_dir = true #false
  config.default_rails_root(__FILE__) 
  config.lib = File.dirname(__FILE__) + '/../lib'
  config.logger = :stdout  # :file
end


describe CanTango::Generators::RolePermitGenerator do
  use_helpers :special, :file

  setup_generator :permit do
    tests CanTango::Generators::RolePermitGenerator
  end

  describe 'Run Permit generator' do
    before :each do
      @generator = with_generator do |g|
        g.run_generator "admin --reads all --licenses blogging user_admin".args
      end
    end

    describe 'result of running Permit generator' do
      it "should create Admin permit" do
        @generator.should generate_permit :admin
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cantango-0.8.6 spec/generators/cantango/role_permit_generator_spec.rb
cantango-0.8.5.1 spec/generators/cantango/role_permit_generator_spec.rb
cantango-0.8.0 spec/generators/cantango/role_permit_generator_spec.rb