Sha256: afcf60e4242f1459372f3e90047152264d6bfb2aee75ac19fd42bf8a5bc69f5b
Contents?: true
Size: 406 Bytes
Versions: 19
Compression:
Stored size: 406 Bytes
Contents
class TestGenerator < Rails::Generators::Base argument :name, :type => :string class_option :test, :type => :boolean, :default => false source_root File.expand_path('../templates', __FILE__) def copy_initializer template "initializer.rb", "config/initializers/test.rb" if options[:test] end def create_migration template "migration.rb", "db/migrate/123_create_tests.rb" end end
Version data entries
19 entries across 19 versions & 2 rubygems