From 3c01a693d9306012883f8319b476dc7f841c4d24 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sun, 5 May 2013 07:06:50 -0700 Subject: Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets Fix tests related to scaffolding generator with --assets=false switch --- railties/test/generators/scaffold_generator_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 92d529d9b1..72fca0c99a 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -269,21 +269,21 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_file "config/routes.rb", /\.routes\.draw do\s*\|map\|\s*$/ end - def test_scaffold_generator_no_assets + def test_scaffold_generator_no_assets_with_switch_no_assets run_generator [ "posts", "--no-assets" ] assert_file "app/assets/stylesheets/scaffold.css" assert_no_file "app/assets/javascripts/posts.js" assert_no_file "app/assets/stylesheets/posts.css" end - def test_scaffold_generator_no_assets + def test_scaffold_generator_no_assets_with_switch_assets_false run_generator [ "posts", "--assets=false" ] - assert_file "app/assets/stylesheets/scaffold.css" + assert_no_file "app/assets/stylesheets/scaffold.css" assert_no_file "app/assets/javascripts/posts.js" assert_no_file "app/assets/stylesheets/posts.css" end - def test_scaffold_generator_no_assets + def test_scaffold_generator_no_assets_with_switch_resource_route_false run_generator [ "posts", "--resource-route=false" ] assert_file "config/routes.rb" do |route| assert_no_match(/resources :posts$/, route) -- cgit v1.2.3