diff options
-rw-r--r-- | railties/lib/generators/rails/app/templates/config/boot.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/all.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/tasks.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/railtie.rb | 11 | ||||
-rw-r--r-- | railties/test/application/generators_test.rb | 10 |
6 files changed, 23 insertions, 5 deletions
diff --git a/railties/lib/generators/rails/app/templates/config/boot.rb b/railties/lib/generators/rails/app/templates/config/boot.rb index e91304451b..7fc1aeaeb8 100644 --- a/railties/lib/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/generators/rails/app/templates/config/boot.rb @@ -26,6 +26,7 @@ require 'rails/all' # require "action_view/railtie" # require "action_mailer/railtie" # require "active_resource/railtie" +# require "rails/test_unit/railtie" <% else -%> # Pick the frameworks you want: # require "active_model/railtie" @@ -35,4 +36,5 @@ require "action_controller/railtie" require "action_view/railtie" require "action_mailer/railtie" require "active_resource/railtie" +require "rails/test_unit/railtie" <% end -%>
\ No newline at end of file diff --git a/railties/lib/rails/all.rb b/railties/lib/rails/all.rb index b8292a9b7e..1a0b4a8d73 100644 --- a/railties/lib/rails/all.rb +++ b/railties/lib/rails/all.rb @@ -8,6 +8,7 @@ require "rails" action_view action_mailer active_resource + rails/test_unit ).each do |framework| begin require "#{framework}/railtie" diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 2281746b00..ccf338bb6c 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -58,8 +58,7 @@ module Rails :scaffold_controller => :scaffold_controller, :singleton => false, :stylesheets => true, - :template_engine => :erb, - :test_framework => :test_unit + :template_engine => :erb }, :test_unit => { diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb index 44c014efe8..9807000578 100644 --- a/railties/lib/rails/tasks.rb +++ b/railties/lib/rails/tasks.rb @@ -10,7 +10,6 @@ $VERBOSE = nil misc routes statistics - testing tmp ).each do |task| load "rails/tasks/#{task}.rake" diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb new file mode 100644 index 0000000000..6858e8ebbd --- /dev/null +++ b/railties/lib/rails/test_unit/railtie.rb @@ -0,0 +1,11 @@ +module Rails + class TestUnitRailtie < Rails::Railtie + railtie_name :test_unit + + config.generators.test_framework :test_unit + + rake_tasks do + load "rails/tasks/testing.rake" + end + end +end
\ No newline at end of file diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 1e6e30e9c3..13fbdfb417 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -19,8 +19,14 @@ module ApplicationTests yield app_const.config end + def with_bare_config + require "rails" + require "rails/generators" + yield app_const.config + end + test "generators default values" do - with_config do |c| + with_bare_config do |c| assert_equal(true, c.generators.colorize_logging) assert_equal({}, c.generators.aliases) assert_equal({}, c.generators.options) @@ -75,7 +81,7 @@ module ApplicationTests end test "generators with hashes for options and aliases" do - with_config do |c| + with_bare_config do |c| c.generators do |g| g.orm :datamapper, :migration => false g.plugin :aliases => { :generator => "-g" }, |