Methods
- T
Instance Public methods
Source: show
# File rails/actionpack/test/controller/routing_test.rb, line 563 def test_interpolation_chunk_should_respect_raw s = ROUTING::StaticSegment.new s.value = 'Hello/World' assert ! s.raw? assert_equal 'Hello/World', CGI.unescape(s.interpolation_chunk) s.raw = true assert s.raw? assert_equal 'Hello/World', s.interpolation_chunk end
Source: show
# File rails/actionpack/test/controller/routing_test.rb, line 584 def test_regexp_chunk_should_add_question_mark_for_optionals s = ROUTING::StaticSegment.new s.value = "/" s.is_optional = true assert_equal "/?", s.regexp_chunk s.value = "hello" assert_equal "(?:hello)?", s.regexp_chunk end
Source: show
# File rails/actionpack/test/controller/routing_test.rb, line 574 def test_regexp_chunk_should_escape_specials s = ROUTING::StaticSegment.new s.value = 'Hello*World' assert_equal 'Hello\*World', s.regexp_chunk s.value = 'HelloWorld' assert_equal 'HelloWorld', s.regexp_chunk end