diff options
author | Xavier Noria <fxn@hashref.com> | 2011-12-02 04:32:18 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-12-02 04:35:43 -0800 |
commit | 0306f82e0c3cda3aad1b45eb0c3a359c254b62cc (patch) | |
tree | 08ddebf4733e3b3c2b24d4ee1db8313c4a447f71 /railties/test | |
parent | 4d20de8a50d889a09e6f5642984775fe796ca943 (diff) | |
download | rails-0306f82e0c3cda3aad1b45eb0c3a359c254b62cc.tar.gz rails-0306f82e0c3cda3aad1b45eb0c3a359c254b62cc.tar.bz2 rails-0306f82e0c3cda3aad1b45eb0c3a359c254b62cc.zip |
implements automatic EXPLAIN logging for slow queries
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 235c08e38e..41bb4d8b20 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -336,6 +336,15 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_generated_environments_file_for_auto_explain + run_generator [destination_root, "--skip-active-record"] + %w(development test production).each do |env| + assert_file "config/environments/#{env}.rb" do |file| + assert_no_match %r(auto_explain_threshold_in_seconds), file + end + end + end + protected def action(*args, &block) |