mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix the app_generator and plugin_new tests
This commit is contained in:
parent
55d153ea8d
commit
12fb9372bf
2 changed files with 4 additions and 1 deletions
|
@ -138,12 +138,14 @@ module Rails
|
|||
end
|
||||
|
||||
def rails_gemfile_entry
|
||||
# TODO remove sprockets-rails from this list when the version 2.0 is realease
|
||||
if options.dev?
|
||||
<<-GEMFILE.strip_heredoc
|
||||
gem 'rails', path: '#{Rails::Generators::RAILS_DEV_PATH}'
|
||||
gem 'journey', github: 'rails/journey'
|
||||
gem 'arel', github: 'rails/arel'
|
||||
gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders'
|
||||
gem 'sprockets-rails', github: 'rails/sprockets-rails'
|
||||
GEMFILE
|
||||
elsif options.edge?
|
||||
<<-GEMFILE.strip_heredoc
|
||||
|
@ -151,6 +153,7 @@ module Rails
|
|||
gem 'journey', github: 'rails/journey'
|
||||
gem 'arel', github: 'rails/arel'
|
||||
gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders'
|
||||
gem 'sprockets-rails', github: 'rails/sprockets-rails'
|
||||
GEMFILE
|
||||
else
|
||||
<<-GEMFILE.strip_heredoc
|
||||
|
|
|
@ -223,7 +223,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
def test_generator_if_skip_sprockets_is_given
|
||||
run_generator [destination_root, "--skip-sprockets"]
|
||||
assert_file "config/application.rb" do |content|
|
||||
assert_match(/#\s+require\s+["']sprockets\/rails\/railtie["']/, content)
|
||||
assert_match(/#\s+require\s+["']sprockets\/railtie["']/, content)
|
||||
assert_no_match(/config\.assets\.enabled = true/, content)
|
||||
end
|
||||
assert_file "Gemfile" do |content|
|
||||
|
|
Loading…
Reference in a new issue