Sha256: b8b34fafc2b79655e60c85ed6e65974e4bdb228881a308131ffff0f7e64e9cb4

Contents?: true

Size: 312 Bytes

Versions: 4

Compression:

Stored size: 312 Bytes

Contents

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

      def create_policy_spec
        template 'policy_spec.rb', File.join('spec/policies', class_path, "#{file_name}_policy_spec.rb")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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