Sha256: b77930b64742919b5598a960e3752f20d573a406338a95b7b72b540ae2d2fe5c

Contents?: true

Size: 341 Bytes

Versions: 13

Compression:

Stored size: 341 Bytes

Contents

module TestUnit
  module Generators
    class PolicyGenerator < ::Rails::Generators::NamedBase
      source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))

      def create_policy_test
        template 'policy_test.rb', File.join('test/policies', class_path, "#{file_name}_policy_test.rb")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/pundit-1.1.0/lib/generators/test_unit/policy_generator.rb
pundit-1.1.0 lib/generators/test_unit/policy_generator.rb
canner-0.4.0 lib/generators/test_unit/policy_generator.rb
regulator-0.1.3 lib/generators/test_unit/policy_generator.rb
regulator-0.1.2 lib/generators/test_unit/policy_generator.rb
pundit-1.0.1 lib/generators/test_unit/policy_generator.rb
pundit-1.0.0 lib/generators/test_unit/policy_generator.rb
canner-0.3.0 lib/generators/test_unit/policy_generator.rb
canner-0.2.2 lib/generators/test_unit/policy_generator.rb
canner-0.2.1 lib/generators/test_unit/policy_generator.rb
canner-0.2.0 lib/generators/test_unit/policy_generator.rb
canner-0.1.0 lib/generators/test_unit/policy_generator.rb
pundit-0.3.0 lib/generators/test_unit/policy_generator.rb