From ef46b9f21a275249d1b0cf9926ffb879b0ae2c44 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Tue, 9 Nov 2010 05:10:39 +0000 Subject: Strip regexp anchors from rake routes output [#5934 state:resolved] --- railties/test/application/rake_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/test/application/rake_test.rb') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 8e527236ea..719550f9d9 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -38,5 +38,14 @@ module ApplicationTests assert_match "Code LOC: 5 Test LOC: 0 Code to Test Ratio: 1:0.0", Dir.chdir(app_path){ `rake stats` } end + + def test_rake_routes_output_strips_anchors_from_http_verbs + app_file "config/routes.rb", <<-RUBY + AppTemplate::Application.routes.draw do + get '/cart', :to => 'cart#show' + end + RUBY + assert_match 'cart GET /cart(.:format)', Dir.chdir(app_path){ `rake routes` } + end end end -- cgit v1.2.3