[Lift] Re: Testing snippets that depend on a user logged in

2009-10-02 Thread etorreborre
Hi all, I added a specs version as well. Eric. On Oct 2, 2:37 pm, Bill Venners b...@artima.com wrote: Hi Ryan, David, Eric, I added a ScalaTest version to your wiki page: http://wiki.github.com/dpp/liftweb/how-to-unit-test-lift-snippets-wit... Eric you may want to add a specs version.

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-02 Thread rstradling
Sweet!!! Thanks Bill for adding a ScalaTest version. I wanted to but just did not find the time yesterday. I also don't know ScalaTest very well but will be working with it shortly. On Oct 2, 12:37 am, Bill Venners b...@artima.com wrote: Hi Ryan, David, Eric, I added a ScalaTest version to

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread David Pollak
Using Specs 1.6: object HelloWorldTestSpecs extends Specification { val session = new LiftSession(, randomString(20), Empty) val stableTime = now override def executeExpectations(ex: Examples, t: =Any): Any = { S.initIfUninitted(session) { ... put your User init here. The

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread Bill Venners
Hi Ryan, It looks like you're currently using a JUnit TestCase. If you want an easier port to something that would work you could use a ScalaTest Suite like this: import org.scalatest.Suite class YourSuite extends Suite { val session = new LiftSession(, randomString(20), Empty) val

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread David Pollak
Bill, Thanks for posting this. I am, by experience (I started using it, I can use it enough to write basic tests, I know no more) using Specs. I would welcome and encourage some sample tests in Lift archetypes that use ScalaTest. I want to make sure that folks who pick up Lift get to experience

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread Bill Venners
Hi David, Thanks. I appreciate that. I was actually already planning to request getting some ScalaTest examples in the Lift archetypes right after ScalaTest 1.0 comes out (on Oct 12, if all goes as planned), and have already arranged with David Bernard to put ScalaTest examples into

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread David Pollak
Bill, Cool. If you're going to be at Silicon Valley Code Camp on Saturday, let's talk more about any mechanics. Thanks, David On Thu, Oct 1, 2009 at 2:26 PM, Bill Venners b...@artima.com wrote: Hi David, Thanks. I appreciate that. I was actually already planning to request getting some

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread rstradling
Awesome!!! Thanks guys for the help. It now works. I put a how-to wiki document up on github. For me this was one of those times where my google searches did not seem to turn up anything fruitful, so I thought this how-to would be helpful. If it is not helpful, then no hard feelings if the

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread David Pollak
On Thu, Oct 1, 2009 at 3:03 PM, rstradling ryanstradl...@gmail.com wrote: Awesome!!! Thanks guys for the help. It now works. I put a how-to wiki document up on github. For me this was one of those times where my google searches did not seem to turn up anything fruitful, so I thought this

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread etorreborre
Hi, I am working at the moment on a small lift demo app and I've added some enhancements to specs in order to ease the testing inside a session. To use those functionalities, you need specs-1.6.1-SNAPSHOT (http:// www.scala-tools.org/repo-snapshots/org/scala-tools/testing/specs/1.6.1-SNAPSHOT).

[Lift] Re: Testing snippets that depend on a user logged in

2009-10-01 Thread Bill Venners
Hi Ryan, David, Eric, I added a ScalaTest version to your wiki page: http://wiki.github.com/dpp/liftweb/how-to-unit-test-lift-snippets-with-a-logged-in-user Eric you may want to add a specs version. Bill On Thu, Oct 1, 2009 at 3:03 PM, rstradling ryanstradl...@gmail.com wrote: Awesome!!!