Francois,
I suspect the problem is that the :game regex has \A and \Z in it.
Because the new routes put that verbatim into the larger route regex,
the match will fail. (Ditto for the /^.*$/ regex, with the ^ and $
anchors.) I *think* (Nicholas, correct me if I'm wrong) that you can
just take the \A and \Z out of the regex and all will be well. Can
you give that a spin and see what happens?
- Jamis
On Jun 28, 2006, at 2:14 AM, Francois Beausoleil wrote:
Hi all,
I seem to have a problem. I attached a test case which I can't make
pass. The route was extracted verbatim from an existing application.
If I rollback in time to r4393, the tests pass.
The route is:
map.game_instructions 'game/:game/instructions', :controller =>
'games',
:action => 'instructions', :requirements => {:game => /\A[-\w \+
%]+\Z/i}
That is one of many routes I test. The only route test I can make
pass is if I remove the requirements. In the tests, you'll also see I
have much less stringent requirements for the game parameter: /^.*$/
is one of them, and that fails too.
Can anyone shed some light on this ?
Thanks !
--
François Beausoleil
http://blog.teksol.info/
<routing-test.patch>
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core