mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix test
This commit is contained in:
parent
5e406a3311
commit
60bbd1571a
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue