Permalink
Browse files

Merge pull request #3409 from guilleiguaran/lock-turn-version

Lock turn version to 0.8.2 if Ruby version is 1.9.2
  • Loading branch information...
2 parents 8ce3ff3 + 6f7d4ae commit 203230404d1d4bf33dcc8a22941d96fad7fd4694 @vijaydev vijaydev 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
View
3 railties/lib/rails/generators/app_base.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
View
3 railties/test/generators/app_generator_test.rb
@@ -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 2032304

Please sign in to comment.