diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-14 11:03:31 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-14 12:46:25 -0300 |
commit | 96aea58f2256ce977e3209f3ebc5d87e5035063f (patch) | |
tree | 0fbbefa70ef90af35ce08d4e1d8e417eb0010b7f /railties/test | |
parent | 570cc89bad00a0df20e11196fa34d3119327a7d6 (diff) | |
download | rails-96aea58f2256ce977e3209f3ebc5d87e5035063f.tar.gz rails-96aea58f2256ce977e3209f3ebc5d87e5035063f.tar.bz2 rails-96aea58f2256ce977e3209f3ebc5d87e5035063f.zip |
Do not generate app/views and sprockets entries on http app
[Carlos Antonio da Silva & Santiago Pastorino]
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 6f1d56701c..363155bc55 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -378,6 +378,22 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "app/controllers/application_controller.rb", /^ # protect_from_forgery/ end + def test_http_does_not_generate_app_views_dir + run_generator [destination_root, "--http"] + assert_no_directory "app/views" + end + + def test_http_skip_sprockets_entries_in_gemfile_and_application + run_generator [destination_root, "--http"] + assert_file "Gemfile" do |content| + assert_no_match(/group :assets/, content) + end + assert_file "config/application.rb" do |content| + assert_match(/^# require "sprockets/, content) + assert_no_match(/config\.assets/, content) + end + end + def test_pretend_option output = run_generator [File.join(destination_root, "myapp"), "--pretend"] assert_no_match(/run bundle install/, output) @@ -388,7 +404,6 @@ protected def action(*args, &block) silence(:stdout) { generator.send(*args, &block) } end - end class CustomAppGeneratorTest < Rails::Generators::TestCase |