Skip to content

Commit

Permalink
Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets
Browse files Browse the repository at this point in the history
Fix tests related to scaffolding generator with --assets=false switch
  • Loading branch information
carlosantoniodasilva committed May 5, 2013
1 parent c339b3d commit 2901346
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions railties/test/generators/scaffold_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2901346

Please sign in to comment.