mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
11 lines
341 B
Ruby
11 lines
341 B
Ruby
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
|