Check out Joe O'Brien's recent rSpec post:  http://objo.com/2006/11/7/rspec-7-is-out
That might get you part of the way. 
-Chris

On 11/8/06, Željko Filipin <[EMAIL PROTECTED]> wrote:
You have a bunch of Watir tests, right? With every build of your application under test, you run them all. If a test fails, application should be fixed, or you test should be fixed. Wouldn't it be nice to make how-to documents from that tests?

Time for an example.

def login_as(username, password)
  ie.goto("my.app/login")
  ie.should_contain("please login")
 
  ie.text_field(:id, "username").set(username)
  ie.text_field(:id, "password").set(password)
  ie.button(:value, "login").click
  ie.should_contain("logged in as #{username}")
end

You run that test, and you get output like this:

How to login?
- go to page my.app/login
- there should be text "please login"

- enter username at username text field
- enter password at password text field
- click button login

- there should be text "logged in as username"

Has anybody done something like this? I am thinking of doing it, but If somebody has done it already, I would like to take a look.

Zeljko
--
http://zeljkofilipin.com/
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to