diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
commit | 920ad94598a9b90d048cb7cb19a34d7cb9e80392 (patch) | |
tree | 77e016c3a03fc2ad0cf290e9e38f166b327c1622 /railties/test | |
parent | 62d8a1c84406f8021c74a02fea320cf2fb129adf (diff) | |
parent | d2553c3409843986be2c00394687828195b913dc (diff) | |
download | rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.gz rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.bz2 rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.zip |
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generator_test_helper.rb | 3 | ||||
-rw-r--r-- | railties/test/initializer_test.rb | 21 |
2 files changed, 22 insertions, 2 deletions
diff --git a/railties/test/generators/generator_test_helper.rb b/railties/test/generators/generator_test_helper.rb index 80d5b145be..0901b215e4 100644 --- a/railties/test/generators/generator_test_helper.rb +++ b/railties/test/generators/generator_test_helper.rb @@ -5,9 +5,10 @@ require 'fileutils' module ActiveRecord class Base class << self - attr_accessor :pluralize_table_names + attr_accessor :pluralize_table_names, :timestamped_migrations end self.pluralize_table_names = true + self.timestamped_migrations = true end module ConnectionAdapters diff --git a/railties/test/initializer_test.rb b/railties/test/initializer_test.rb index dee7abe05f..07303a510e 100644 --- a/railties/test/initializer_test.rb +++ b/railties/test/initializer_test.rb @@ -136,8 +136,27 @@ uses_mocha 'framework paths' do end end - protected + def test_action_mailer_load_paths_set_only_if_action_mailer_in_use + @config.frameworks = [:action_controller] + initializer = Rails::Initializer.new @config + initializer.send :require_frameworks + + assert_nothing_raised NameError do + initializer.send :load_view_paths + end + end + def test_action_controller_load_paths_set_only_if_action_controller_in_use + @config.frameworks = [] + initializer = Rails::Initializer.new @config + initializer.send :require_frameworks + + assert_nothing_raised NameError do + initializer.send :load_view_paths + end + end + + protected def assert_framework_path(path) assert @config.framework_paths.include?(path), "<#{path.inspect}> not found among <#{@config.framework_paths.inspect}>" |