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

Version Path
generator_spec-0.10.0 spec/support/test_generator/test_generator.rb
generator_spec-0.9.5 spec/support/test_generator/test_generator.rb
generator_spec-0.9.4 spec/support/test_generator/test_generator.rb
generator_spec-0.9.3 spec/support/test_generator/test_generator.rb
generator_spec-0.9.2 spec/support/test_generator/test_generator.rb
generator_spec-0.9.1 spec/support/test_generator/test_generator.rb
generator_spec-0.9.0 spec/support/test_generator/test_generator.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.7/spec/support/test_generator/test_generator.rb
generator_spec-0.8.7 spec/support/test_generator/test_generator.rb
generator_spec-0.8.6 spec/support/test_generator/test_generator.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.5/spec/support/test_generator/test_generator.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.5/spec/support/test_generator/test_generator.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.5/spec/support/test_generator/test_generator.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.5/spec/support/test_generator/test_generator.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/generator_spec-0.8.5/spec/support/test_generator/test_generator.rb
generator_spec-0.8.5 spec/support/test_generator/test_generator.rb
generator_spec-0.8.4 spec/support/test_generator/test_generator.rb
generator_spec-0.8.3 spec/support/test_generator/test_generator.rb
generator_spec-0.8.2 spec/support/test_generator/test_generator.rb