Skip to content

Commit

Permalink
add task to gen controller
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jan 22, 2010
1 parent 9207277 commit eb9751f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Expand Up @@ -41,6 +41,11 @@ task :create_app => [:build] do
ruby "rails/railties/bin/rails tmp/example_app --dev -m example_app_template.rb"
end

desc 'run controller generator'
task :generate_controller do
sh "cd ./tmp/example_app && script/generate controller things new"
end

desc 'generate rspec'
task :generate_rspec do
sh "cd ./rails && script/generate rspec"
Expand Down
16 changes: 16 additions & 0 deletions example_app_template.rb
Expand Up @@ -4,3 +4,19 @@
# - would be nicer if we could source them from the <repo>/pkg dirs
gem 'rspec-rails', :version => "'#{Rspec::Rails::Version::STRING}'"

initializer 'generators.rb', <<-CODE
module ExampleApp
class Application < Rails::Application
config.generators do |g|
g.test_framework :rspec,
:fixtures => false,
:integration_tool => false,
:routes => true,
:views => false
g.integration_tool :rspec
end
end
end
CODE

0 comments on commit eb9751f

Please sign in to comment.