diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:31:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:31:45 -0700 |
commit | 5682596db740d53e1deaf9244fcc004ccffe1fb4 (patch) | |
tree | 8f1d8321d437f02777a7e73c907e220316d38cbf | |
parent | 333a4d09ab8b024b3d23618e9d668bef2bab1355 (diff) | |
download | rails-5682596db740d53e1deaf9244fcc004ccffe1fb4.tar.gz rails-5682596db740d53e1deaf9244fcc004ccffe1fb4.tar.bz2 rails-5682596db740d53e1deaf9244fcc004ccffe1fb4.zip |
Strexp#names is only used in a test, so rm
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/strexp.rb | 4 | ||||
-rw-r--r-- | actionpack/test/journey/router/strexp_test.rb | 32 |
2 files changed, 0 insertions, 36 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/strexp.rb b/actionpack/lib/action_dispatch/journey/router/strexp.rb index 29196d20bb..4b7738f335 100644 --- a/actionpack/lib/action_dispatch/journey/router/strexp.rb +++ b/actionpack/lib/action_dispatch/journey/router/strexp.rb @@ -21,10 +21,6 @@ module ActionDispatch @separators = separators @anchor = anchor end - - def names - @path.scan(/:\w+/).map { |s| s.tr(':', '') } - end end end end diff --git a/actionpack/test/journey/router/strexp_test.rb b/actionpack/test/journey/router/strexp_test.rb deleted file mode 100644 index 9cb333757c..0000000000 --- a/actionpack/test/journey/router/strexp_test.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'abstract_unit' - -module ActionDispatch - module Journey - class Router - class TestStrexp < ActiveSupport::TestCase - def test_many_names - exp = Strexp.build( - "/:controller(/:action(/:id(.:format)))", - {:controller=>/.+?/}, - ["/", ".", "?"], - true) - - assert_equal ["controller", "action", "id", "format"], exp.names - end - - def test_names - { - "/bar(.:format)" => %w{ format }, - ":format" => %w{ format }, - ":format-" => %w{ format }, - ":format0" => %w{ format0 }, - ":format1,:format2" => %w{ format1 format2 }, - }.each do |string, expected| - exp = Strexp.build(string, {}, ["/", ".", "?"]) - assert_equal expected, exp.names - end - end - end - end - end -end |