diff options
author | Arun Agrawal <arunagw@gmail.com> | 2013-05-03 11:42:30 +0200 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2013-05-04 15:48:44 +0200 |
commit | f1805a697831b356a2a6877291628fea8e2216e6 (patch) | |
tree | 50cbc9785943bd3ff63f0219ae54c42ed9ce07d7 /railties/test | |
parent | 903a2c2d33c91edaae08a952d94b4ac35a7443da (diff) | |
download | rails-f1805a697831b356a2a6877291628fea8e2216e6.tar.gz rails-f1805a697831b356a2a6877291628fea8e2216e6.tar.bz2 rails-f1805a697831b356a2a6877291628fea8e2216e6.zip |
Fixes Scaffold generator with --assets=false
Scaffold generator with --assets=false option
outputs an error
See #9525
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/scaffold_generator_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 25f299118c..e3dc323b24 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -246,6 +246,20 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_no_file "app/assets/stylesheets/posts.css" end + def test_scaffold_generator_no_assets + run_generator [ "posts", "--assets=false" ] + 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 + run_generator [ "posts", "--resource-route=false" ] + assert_file "config/routes.rb" do |route| + assert_no_match(/resources :posts$/, route) + end + end + def test_scaffold_generator_no_stylesheets run_generator [ "posts", "--no-stylesheets" ] assert_no_file "app/assets/stylesheets/scaffold.css" |