diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-04 15:00:19 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-04 15:00:29 -0800 |
commit | 7eb586f57f3e9eb63954a432180b4661ffca7916 (patch) | |
tree | 1a2fb0817e64d7dac409a56a026fe86e454b48db /railties/test/generators | |
parent | 8beb42cfbc41753ae4dbb91e16abcd1fb7d00356 (diff) | |
download | rails-7eb586f57f3e9eb63954a432180b4661ffca7916.tar.gz rails-7eb586f57f3e9eb63954a432180b4661ffca7916.tar.bz2 rails-7eb586f57f3e9eb63954a432180b4661ffca7916.zip |
application template respects Gemfile entries
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index bd8efcc6c7..43a985615f 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -182,6 +182,26 @@ class AppGeneratorTest < Rails::Generators::TestCase template.unlink end + def test_application_html_checks_gems + template = Tempfile.open 'my_template' + template.puts 'add_gem_entry_filter { |gem| gem.name != "turbolinks" }' + template.flush + + run_generator([destination_root, "-m", template.path]) + assert_file "Gemfile" do |contents| + assert_no_match 'turbolinks', contents + end + assert_file "Gemfile" do |contents| + assert_no_match 'turbolinks', contents + end + assert_file "app/views/layouts/application.html.erb" do |contents| + assert_no_match 'turbolinks', contents + end + ensure + template.close + template.unlink + end + def test_config_another_database run_generator([destination_root, "-d", "mysql"]) assert_file "config/database.yml", /mysql/ |