Skip to content
Browse files

Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets

Fix tests related to scaffolding generator with --assets=false switch
  • Loading branch information...
1 parent c339b3d commit 2901346fec8555a63e7a260420ce706c8f30b9e0 @carlosantoniodasilva carlosantoniodasilva committed May 5, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 railties/test/generators/scaffold_generator_test.rb
View
8 railties/test/generators/scaffold_generator_test.rb
@@ -239,21 +239,21 @@ def test_scaffold_generator_on_revoke_does_not_mutilate_legacy_map_parameter
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_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_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)

0 comments on commit 2901346

Please sign in to comment.
Something went wrong with that request. Please try again.