Domain Specific Language in Integration Testing
I found something cool about Integration tests in Rails. We could built a mini language ( DSL) for your Integration tests.
For example in Varcasa, I could write Integration tests like this
def test_user_should_be_able_login_after_registration_story
user = regular_user
user.goto_registration_page
user.register("user","password","email)
user.goto_login_page
user.login("user","password")
end
It is so much fun. I am amazed how ruby makes it so easy to define a DSL.
More Info:
For example in Varcasa, I could write Integration tests like this
def test_user_should_be_able_login_after_registration_story
user = regular_user
user.goto_registration_page
user.register("user","password","email)
user.goto_login_page
user.login("user","password")
end
It is so much fun. I am amazed how ruby makes it so easy to define a DSL.
More Info:

0 Comments:
Post a Comment
<< Home