Sha256: c1d6cf794fe9ee9e4827d8bf6f2ce70cfc52be1938b64899e809b0d483d7d2f8

Contents?: true

Size: 881 Bytes

Versions: 3

Compression:

Stored size: 881 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 --account 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/account_role_permit_generator_spec.rb
cantango-0.8.5.1 spec/generators/cantango/account_role_permit_generator_spec.rb
cantango-0.8.0 spec/generators/cantango/account_role_permit_generator_spec.rb