aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-02-07 00:15:20 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-02-07 08:27:32 -0500
commit5bfee55947909506d133c9b336da989fd4903bd7 (patch)
tree1d30f68db041b3ea8711de6832e5ef0364550f54
parentee6e3c128b721570c8e59f507ea605cdd752cf7f (diff)
downloadrails-5bfee55947909506d133c9b336da989fd4903bd7.tar.gz
rails-5bfee55947909506d133c9b336da989fd4903bd7.tar.bz2
rails-5bfee55947909506d133c9b336da989fd4903bd7.zip
--edge option should generate app with rails 3-2-stable
-rw-r--r--railties/lib/rails/generators/app_base.rb2
-rw-r--r--railties/test/generators/app_generator_test.rb4
-rw-r--r--railties/test/generators/shared_generator_tests.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 4efb643d44..1ebe56c6ab 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -143,7 +143,7 @@ module Rails
GEMFILE
elsif options.edge?
<<-GEMFILE.strip_heredoc
- gem 'rails', :git => 'git://github.com/rails/rails.git'
+ gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-2-stable'
gem 'journey', :git => 'git://github.com/rails/journey.git'
gem 'arel', :git => 'git://github.com/rails/arel.git'
GEMFILE
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 385f00d331..13f637076c 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -136,8 +136,8 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_edge_gemfile_option
generator([destination_root], :edge => true).expects(:bundle_command).with('install').once
quietly { generator.invoke_all }
- assert_file 'Gemfile', %r{^\s+gem\s+["']sass-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/sass-rails.git")}["']$}
- assert_file 'Gemfile', %r{^\s+gem\s+["']coffee-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/coffee-rails.git")}["']$}
+ assert_file 'Gemfile', %r{^\s+gem\s+["']sass-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/sass-rails.git")}["'],\s+:branch\s+=>\s+["']3-2-stable["']$}
+ assert_file 'Gemfile', %r{^\s+gem\s+["']coffee-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/coffee-rails.git")}["'],\s+:branch\s+=>\s+["']3-2-stable["']$}
end
def test_config_database_is_added_by_default
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index 2ae3ec706e..b262951b88 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -125,7 +125,7 @@ module SharedGeneratorTests
def test_edge_option
generator([destination_root], :edge => true).expects(:bundle_command).with('install').once
quietly { generator.invoke_all }
- assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$}
+ assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["'],\s+:branch\s+=>\s+["']3-2-stable["']$}
assert_file 'Gemfile', %r{^gem\s+["']journey["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/journey.git")}["']$}
assert_file 'Gemfile', %r{^gem\s+["']arel["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/arel.git")}["']$}
end