Url Rewriting Test Support

13 views
Skip to first unread message

Keynan Pratt

unread,
Jan 19, 2011, 1:20:04 AM1/19/11
to lif...@googlegroups.com
I was having some problems with url rewriting so I started looking for a way to test that specific piece.
Having been unable to find anything I created the attached patch so that it's possible to unit test application rewrites.




UrlWritingTestabilityPatch.patch

Derek Chen-Becker

unread,
Jan 19, 2011, 8:06:24 AM1/19/11
to lif...@googlegroups.com
I'm actually working on more complete unit testing support right now:

https://www.assembla.com/spaces/liftweb/tickets/793-add-support-for-unit-testing-resthelper-without-full-jetty-lift-environment

I'll see what I can do to integrate this as well.

Derek

On Tue, Jan 18, 2011 at 11:20 PM, Keynan Pratt <keyn...@gmail.com> wrote:
I was having some problems with url rewriting so I started looking for a way to test that specific piece.
Having been unable to find anything I created the attached patch so that it's possible to unit test application rewrites.




--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Derek Chen-Becker

unread,
Jan 19, 2011, 8:40:05 AM1/19/11
to lif...@googlegroups.com
If you don't mind, could you show me an example of how you would want to use this? For what I'm currently writing I envision something like:

LiftRules.statelessRewrite.append { ... }
MockWeb.withUrl("http://foo.com/bar") { request =>
  // do testing on the rewritten request
  ...
}

But I'm open to use case suggestions.

Derek

On Tue, Jan 18, 2011 at 11:20 PM, Keynan Pratt <keyn...@gmail.com> wrote:
I was having some problems with url rewriting so I started looking for a way to test that specific piece.
Having been unable to find anything I created the attached patch so that it's possible to unit test application rewrites.
Reply all
Reply to author
Forward
0 new messages