Sha256: 81f941100290680cf32dd71753502a7b9b3b6458d2efe623ae22eaaa432e2f6a

Contents?: true

Size: 315 Bytes

Versions: 4

Compression:

Stored size: 315 Bytes

Contents

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

      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

4 entries across 4 versions & 1 rubygems

Version Path
pundit-2.1.0 lib/generators/test_unit/policy_generator.rb
pundit-2.0.1 lib/generators/test_unit/policy_generator.rb
pundit-2.0.0 lib/generators/test_unit/policy_generator.rb
pundit-2.0.0.beta1 lib/generators/test_unit/policy_generator.rb