mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Skip assets groups if --skip-sprockets option is given
This commit is contained in:
parent
3e5592848a
commit
b12a17665a
2 changed files with 6 additions and 0 deletions
|
@ -193,6 +193,7 @@ module Rails
|
|||
end
|
||||
|
||||
def assets_gemfile_entry
|
||||
return if options[:skip_sprockets]
|
||||
<<-GEMFILE.strip_heredoc
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
|
|
|
@ -206,6 +206,11 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
assert_match(/#\s+require\s+["']sprockets\/railtie["']/, content)
|
||||
assert_no_match(/config\.assets\.enabled = true/, content)
|
||||
end
|
||||
assert_file "Gemfile" do |content|
|
||||
assert_no_match(/sass-rails/, content)
|
||||
assert_no_match(/coffee-rails/, content)
|
||||
assert_no_match(/uglifier/, content)
|
||||
end
|
||||
assert_file "test/performance/browsing_test.rb"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue