Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't include 'turn' gem in Gemfile if test unit is skipped.

  • Loading branch information...
commit da29e0bfc2fa83efaf12c9ad31f4b5005178c8a5 1 parent ea306da
@siong1987 siong1987 authored
View
2  railties/lib/rails/generators/app_base.rb
@@ -173,7 +173,7 @@ def gem_for_ruby_debugger
end
def gem_for_turn
- unless RUBY_VERSION < "1.9.2"
+ unless RUBY_VERSION < "1.9.2" || options[:skip_test_unit]
<<-GEMFILE.strip_heredoc
group :test do
# Pretty printed test output
View
7 railties/test/generators/app_generator_test.rb
@@ -210,6 +210,13 @@ def test_inclusion_of_turn_gem_in_gemfile
end
end
+ def test_turn_gem_is_not_included_in_gemfile_if_skipping_test_unit
+ run_generator [destination_root, "--skip-test-unit"]
+ assert_file "Gemfile" do |contents|
+ assert_no_match /gem 'tuarn'/, contents unless RUBY_VERSION < '1.9.2'
+ end
+ end
+
def test_inclusion_of_ruby_debug
run_generator
assert_file "Gemfile" do |contents|
Please sign in to comment.
Something went wrong with that request. Please try again.