Sha256: 927245dfcdedf62b8e04b9e7dc2090f088d71d1a7830405f71c30d5c5928113e

Contents?: true

Size: 338 Bytes

Versions: 22

Compression:

Stored size: 338 Bytes

Contents

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

      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

22 entries across 22 versions & 5 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/pundit-1.1.0/lib/generators/rspec/policy_generator.rb
natural_resource-0.2.0 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.6 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.5 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.4 lib/generators/rspec/policy_generator.rb
pundit-1.1.0 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.2 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.2.pre.3 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.2.pre.2 lib/generators/rspec/policy_generator.rb
natural_resource-0.1.2.pre lib/generators/rspec/policy_generator.rb
canner-0.4.0 lib/generators/rspec/policy_generator.rb
regulator-0.1.3 lib/generators/rspec/policy_generator.rb
regulator-0.1.2 lib/generators/rspec/policy_generator.rb
pundit-1.0.1 lib/generators/rspec/policy_generator.rb
pundit-1.0.0 lib/generators/rspec/policy_generator.rb
canner-0.3.0 lib/generators/rspec/policy_generator.rb
canner-0.2.2 lib/generators/rspec/policy_generator.rb
canner-0.2.1 lib/generators/rspec/policy_generator.rb
canner-0.2.0 lib/generators/rspec/policy_generator.rb
canner-0.1.0 lib/generators/rspec/policy_generator.rb