Permalink
Browse files

Lock turn version to 0.8.2 if Ruby version is 1.9.2

  • Loading branch information...
1 parent ebe64f8 commit 6f7d4ae453767a84e0a6fbc1ae2692c53f8ff0a2 @guilleiguaran guilleiguaran committed Oct 22, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −1 railties/lib/rails/generators/app_base.rb
  2. +2 −1 railties/test/generators/app_generator_test.rb
@@ -190,10 +190,11 @@ def ruby_debugger_gemfile_entry
def turn_gemfile_entry
unless RUBY_VERSION < "1.9.2" || options[:skip_test_unit]
+ version = RUBY_VERSION >= "1.9.3" ? "'~> 0.8.3'" : "'0.8.2'"
<<-GEMFILE.strip_heredoc
group :test do
# Pretty printed test output
- gem 'turn', :require => false
+ gem 'turn', #{version}, :require => false
end
GEMFILE
end
@@ -219,8 +219,9 @@ def test_javascript_is_skipped_if_required
def test_inclusion_of_turn_gem_in_gemfile
run_generator
+ version = RUBY_VERSION >= "1.9.3" ? "'~> 0.8.3'" : "'0.8.2'"
assert_file "Gemfile" do |contents|
- assert_match(/gem 'turn'/, contents) unless RUBY_VERSION < '1.9.2'
+ assert_match(/gem 'turn', #{version}/, contents) unless RUBY_VERSION < '1.9.2'
assert_no_match(/gem 'turn'/, contents) if RUBY_VERSION < '1.9.2'
end
end

0 comments on commit 6f7d4ae

Please sign in to comment.