diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-08 16:52:24 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-08 16:52:24 -0300 |
commit | ec69a45f5bb49c096f460a6bbe85d9d8890488b5 (patch) | |
tree | ca56613443cda48267ca987420f61327ae6f0445 /railties/test | |
parent | a69e0a5fcfbcd76f259ab1ed290fafa8726b44ba (diff) | |
parent | 83b7bf4d3bdb4bc84cbbc5d2859951f5e534e2c2 (diff) | |
download | rails-ec69a45f5bb49c096f460a6bbe85d9d8890488b5.tar.gz rails-ec69a45f5bb49c096f460a6bbe85d9d8890488b5.tar.bz2 rails-ec69a45f5bb49c096f460a6bbe85d9d8890488b5.zip |
Merge pull request #20479 from masarakki/no-scaffold.css-option
add option to avoid generating scaffold.css
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 8f43747b9e..8d7fea8741 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -282,6 +282,20 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_no_file "app/assets/stylesheets/posts.css" end + def test_scaffold_generator_no_scaffold_stylesheet_with_switch_no_scaffold_stylesheet + run_generator [ "posts", "--no-scaffold-stylesheet" ] + assert_no_file "app/assets/stylesheets/scaffold.css" + assert_file "app/assets/javascripts/posts.js" + assert_file "app/assets/stylesheets/posts.css" + end + + def test_scaffold_generator_no_scaffold_stylesheet_with_switch_scaffold_stylesheet_false + run_generator [ "posts", "--scaffold-stylesheet=false" ] + assert_no_file "app/assets/stylesheets/scaffold.css" + assert_file "app/assets/javascripts/posts.js" + assert_file "app/assets/stylesheets/posts.css" + end + def test_scaffold_generator_with_switch_resource_route_false run_generator [ "posts", "--resource-route=false" ] assert_file "config/routes.rb" do |route| |