diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 13:30:08 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 13:30:08 +1100 |
commit | 535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81 (patch) | |
tree | dcbd2acf8e83493eea719bf0a0c51a9c121bf194 /railties/test/application | |
parent | 49a26c533366eff63acd3c99ed0dffc04f85f55c (diff) | |
parent | 9b5dae7af5757769c1e69d74a59ff036adc1f30f (diff) | |
download | rails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.tar.gz rails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.tar.bz2 rails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/generators_test.rb | 13 | ||||
-rw-r--r-- | railties/test/application/middleware_test.rb | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 60d644bd59..56f45582c8 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -93,7 +93,7 @@ module ApplicationTests RUBY require "#{app_path}/config/application" - assert AppTemplate::Application.config.action_controller.allow_concurrency + assert AppTemplate::Application.config.allow_concurrency end test "the application can be marked as threadsafe when there are no frameworks" do diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index e54edea07c..25fa100275 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -30,6 +30,7 @@ module ApplicationTests assert_equal(true, c.generators.colorize_logging) assert_equal({}, c.generators.aliases) assert_equal({}, c.generators.options) + assert_equal({}, c.generators.fallbacks) end end @@ -51,11 +52,20 @@ module ApplicationTests end end - test "generators aliases and options on initialization" do + test "generators set rails fallbacks" do + with_config do |c| + c.generators.fallbacks[:shoulda] = :test_unit + expected = { :shoulda => :test_unit } + assert_equal expected, c.generators.fallbacks + end + end + + test "generators aliases, options and fallbacks on initialization" do add_to_config <<-RUBY config.generators.rails :aliases => { :test_framework => "-w" } config.generators.orm :datamapper config.generators.test_framework :rspec + config.generators.fallbacks[:shoulda] = :test_unit RUBY # Initialize the application @@ -65,6 +75,7 @@ module ApplicationTests assert_equal :rspec, Rails::Generators.options[:rails][:test_framework] assert_equal "-w", Rails::Generators.aliases[:rails][:test_framework] + assert_equal :test_unit, Rails::Generators.fallbacks[:shoulda] end test "generators no color on initialization" do diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 0b92cdba54..ce9cd510a3 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -39,7 +39,7 @@ module ApplicationTests end test "removes lock if allow concurrency is set" do - add_to_config "config.action_controller.allow_concurrency = true" + add_to_config "config.allow_concurrency = true" boot! assert !middleware.include?("Rack::Lock") end |