From 60bbd1571a87b59b32eb4f5487ddc4e6b8b40bbd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 16 Dec 2015 22:59:22 +0100 Subject: Fix test --- railties/test/generators/actions_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index b4fbea4af4..1a928295fd 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -261,7 +261,15 @@ class ActionsTest < Rails::Generators::TestCase content.gsub!(/^\n/, '') 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" @@ -269,6 +277,7 @@ class ActionsTest < Rails::Generators::TestCase Rails.application.routes.draw do resources :product_lines root 'welcome#index' + mount ActionCable.server => '/cable' end F assert_file "config/routes.rb", routes -- cgit v1.2.3