From ea2c5fa8046e2f953b366adc94f0610ccfea0828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 6 Apr 2010 00:12:28 +0200 Subject: A new application now comes with a layout and a stylesheet. --- railties/test/generators/app_generator_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/test/generators/app_generator_test.rb') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 95ca2acf2c..64579c1205 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -51,6 +51,13 @@ class AppGeneratorTest < Rails::Generators::TestCase ).each{ |path| assert_file path } end + def test_application_controller_and_layout_files + run_generator + assert_file "app/controllers/application_controller.rb", /layout 'application'/ + assert_file "app/views/layouts/application.html.erb", /stylesheet_link_tag 'application'/ + assert_file "public/stylesheets/application.css" + end + def test_name_collision_raises_an_error content = capture(:stderr){ run_generator [File.join(destination_root, "generate")] } assert_equal "Invalid application name generate. Please give a name which does not match one of the reserved rails words.\n", content -- cgit v1.2.3