rails--rails/railties/test/generators/stylesheets_generator_test.rb

25 lines
643 B
Ruby
Raw Normal View History

require 'abstract_unit'
require 'generators/generators_test_helper'
require 'rails/generators/rails/stylesheets/stylesheets_generator'
class StylesheetsGeneratorTest < GeneratorsTestCase
def test_copy_stylesheets
run_generator
assert_file "public/stylesheets/scaffold.css"
end
2009-07-01 20:06:05 +00:00
def test_stylesheets_are_not_deleted_on_revoke
run_generator
run_generator :behavior => :revoke
assert_file "public/stylesheets/scaffold.css"
end
protected
2009-07-01 20:06:05 +00:00
def run_generator(config={})
silence(:stdout) { Rails::Generators::StylesheetsGenerator.start [], config.merge(:destination_root => destination_root) }
end
end