提交 763d54b1 编写于 作者: S Santiago Pastorino

Merge pull request #16429 from arunagw/aa-build-fix-gemfile-spring

Fixes test for Gemfile entry changes
......@@ -29,7 +29,7 @@ group :development, :test do
<%- else -%>
gem 'byebug'
<%- end -%>
# Access an IRB console on exceptions page and /console in development
gem 'web-console'
<%- if spring_install? %>
......
......@@ -31,7 +31,7 @@ end
<% end -%>
<%= gem.commented_out ? '# ' : '' %>gem '<%= gem.name %>'<%= %(, '#{gem.version}') if gem.version -%>
<% if gem.options.any? -%>
,<%= gem.padding(max_width) %><%= gem.options.map { |k,v|
, <%= gem.options.map { |k,v|
"#{k}: #{v.inspect}" }.join(', ') %>
<% end -%>
<% end -%>
......
......@@ -299,7 +299,7 @@ def test_inclusion_of_javascript_runtime
if defined?(JRUBY_VERSION)
assert_gem "therubyrhino"
else
assert_file "Gemfile", /# gem\s+["']therubyracer["']+, \s+platforms: :ruby$/
assert_file "Gemfile", /# gem 'therubyracer', platforms: :ruby/
end
end
......@@ -340,7 +340,7 @@ def test_javascript_is_skipped_if_required
def test_inclusion_of_jbuilder
run_generator
assert_file "Gemfile", /gem 'jbuilder'/
assert_gem 'jbuilder'
end
def test_inclusion_of_a_debugger
......@@ -351,9 +351,9 @@ def test_inclusion_of_a_debugger
assert_no_match(/debugger/, content)
end
elsif RUBY_VERSION < '2.0.0'
assert_file "Gemfile", /# gem 'debugger'/
assert_gem 'debugger'
else
assert_file "Gemfile", /# gem 'byebug'/
assert_gem 'byebug'
end
end
......@@ -419,9 +419,14 @@ def test_application_name_with_spaces
assert_file "foo bar/config/initializers/session_store.rb", /key: '_foo_bar/
end
def test_web_console
run_generator
assert_gem 'web-console'
end
def test_spring
run_generator
assert_file "Gemfile", /gem 'spring', \s+group: :development/
assert_gem 'spring'
end
def test_spring_binstubs
......@@ -523,6 +528,6 @@ def action(*args, &block)
end
def assert_gem(gem)
assert_file "Gemfile", /^gem\s+["']#{gem}["']$/
assert_file "Gemfile", /^\s*gem\s+["']#{gem}["']$*/
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册