Skip to content

Commit

Permalink
Fix branch for rails new --edge
Browse files Browse the repository at this point in the history
077c66d#r47159624

Update app_generator_test.rb

fix
  • Loading branch information
ghiculescu committed Feb 16, 2021
1 parent eddb809 commit 7ff5f60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/app_base.rb
Expand Up @@ -301,7 +301,7 @@ def rails_gemfile_entry
]
elsif options.edge?
[
GemfileEntry.github("rails", "rails/rails", "main")
GemfileEntry.github("rails", "rails/rails", "6-1-stable")
]
elsif options.master?
[
Expand Down
2 changes: 1 addition & 1 deletion railties/test/generators/app_generator_test.rb
Expand Up @@ -863,7 +863,7 @@ def test_edge_option
generator([destination_root], edge: true, skip_webpack_install: true)

assert_bundler_command_called("install")
assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["'],\s+branch:\s+["']main["']$}
assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["'],\s+branch:\s+["']#{Regexp.escape("6-1-stable")}["']$}
end

def test_master_option
Expand Down
2 changes: 1 addition & 1 deletion railties/test/generators/plugin_generator_test.rb
Expand Up @@ -216,7 +216,7 @@ def test_dev_option

def test_edge_option
assert_generates_without_bundler(edge: true)
assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["'],\s+branch:\s+["']main["']$}
assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["'],\s+branch:\s+["']#{Regexp.escape("6-1-stable")}["']$}
end

def test_generation_does_not_run_bundle_install_with_full_and_mountable
Expand Down

0 comments on commit 7ff5f60

Please sign in to comment.