1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
This commit is contained in:
David Heinemeier Hansson 2015-12-16 22:59:22 +01:00
parent 5e406a3311
commit 60bbd1571a

View file

@ -261,7 +261,15 @@ class ActionsTest < Rails::Generators::TestCase
content.gsub!(/^\n/, '') content.gsub!(/^\n/, '')
File.open(route_path, "wb") { |file| file.write(content) } File.open(route_path, "wb") { |file| file.write(content) }
assert_file "config/routes.rb", /\.routes\.draw do\n root 'welcome#index'\nend\n\z/
routes = <<-F
Rails.application.routes.draw do
root 'welcome#index'
mount ActionCable.server => '/cable'
end
F
assert_file "config/routes.rb", routes
action :route, "resources :product_lines" action :route, "resources :product_lines"
@ -269,6 +277,7 @@ class ActionsTest < Rails::Generators::TestCase
Rails.application.routes.draw do Rails.application.routes.draw do
resources :product_lines resources :product_lines
root 'welcome#index' root 'welcome#index'
mount ActionCable.server => '/cable'
end end
F F
assert_file "config/routes.rb", routes assert_file "config/routes.rb", routes