aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-05-05 07:06:50 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-05-05 11:31:15 -0300
commit3c01a693d9306012883f8319b476dc7f841c4d24 (patch)
tree652f97561dbb0cb063d464d9fb508b341a1eb561 /railties
parent927a04da40b3d9b97cb23be7c0820eee629f0f7a (diff)
downloadrails-3c01a693d9306012883f8319b476dc7f841c4d24.tar.gz
rails-3c01a693d9306012883f8319b476dc7f841c4d24.tar.bz2
rails-3c01a693d9306012883f8319b476dc7f841c4d24.zip
Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets
Fix tests related to scaffolding generator with --assets=false switch
Diffstat (limited to 'railties')
-rw-r--r--railties/test/generators/scaffold_generator_test.rb8
1 files changed, 4 insertions, 4 deletions
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)