mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
783763bde9
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
19 lines
568 B
Ruby
19 lines
568 B
Ruby
require "generators/generators_test_helper"
|
|
require "rails/generators/rails/assets/assets_generator"
|
|
|
|
class AssetsGeneratorTest < Rails::Generators::TestCase
|
|
include GeneratorsTestHelper
|
|
arguments %w(posts)
|
|
|
|
def test_assets
|
|
run_generator
|
|
assert_file "app/assets/javascripts/posts.js"
|
|
assert_file "app/assets/stylesheets/posts.css"
|
|
end
|
|
|
|
def test_skipping_assets
|
|
run_generator ["posts", "--no-stylesheets", "--no-javascripts"]
|
|
assert_no_file "app/assets/javascripts/posts.js"
|
|
assert_no_file "app/assets/stylesheets/posts.css"
|
|
end
|
|
end
|