strip whitespace errors from the generated Gemfile
This commit is contained in:
parent
ede647a505
commit
b04e2d86df
@ -194,7 +194,7 @@ def ruby_debugger_gemfile_entry
|
||||
|
||||
def assets_gemfile_entry
|
||||
return if options[:skip_sprockets]
|
||||
<<-GEMFILE.strip_heredoc
|
||||
<<-GEMFILE.strip_heredoc.gsub(/^[ \t]*$/, '')
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
group :assets do
|
||||
|
@ -124,6 +124,16 @@ def test_application_names_are_not_singularized
|
||||
assert_file "hats/config/environment.rb", /Hats::Application\.initialize!/
|
||||
end
|
||||
|
||||
def test_gemfile_has_no_whitespace_errors
|
||||
run_generator
|
||||
absolute = File.expand_path("Gemfile", destination_root)
|
||||
File.open(absolute, 'r') do |f|
|
||||
f.each_line do |line|
|
||||
assert_no_match /^[ \t]+$/, line
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_config_database_is_added_by_default
|
||||
run_generator
|
||||
assert_file "config/database.yml", /sqlite3/
|
||||
|
Loading…
Reference in New Issue
Block a user