diff options
Diffstat (limited to 'railties/test/generators/stylesheets_generator_test.rb')
-rw-r--r-- | railties/test/generators/stylesheets_generator_test.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/railties/test/generators/stylesheets_generator_test.rb b/railties/test/generators/stylesheets_generator_test.rb new file mode 100644 index 0000000000..02082d5cc8 --- /dev/null +++ b/railties/test/generators/stylesheets_generator_test.rb @@ -0,0 +1,24 @@ +require 'abstract_unit' +require 'generators/generators_test_helper' +require 'generators/rails/stylesheets/stylesheets_generator' + +class StylesheetsGeneratorTest < GeneratorsTestCase + + def test_copy_stylesheets + run_generator + assert_file "public/stylesheets/scaffold.css" + end + + def test_stylesheets_are_not_deleted_on_revoke + run_generator + run_generator :behavior => :revoke + assert_file "public/stylesheets/scaffold.css" + end + + protected + + def run_generator(config={}) + silence(:stdout) { Rails::Generators::StylesheetsGenerator.start [], config.merge(:destination_root => destination_root) } + end + +end |