1
0
Fork 0
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:
Rafael Mendonça França 2012-10-18 14:31:12 -03:00
parent 55d153ea8d
commit 12fb9372bf
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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|