« GWT 1.5 now supports Object.getClass() | Main | Strategies for testing GWT Widgets and View Components »

June 08, 2008


Feed You can follow this conversation by subscribing to the comment feed for this post.


Thanks for the post. I came to Rails from PHP, where I used SimpleTest, which behaves like webrat. This kind of integration test is the most intuitive way for me to think of tests, so I was happy to find webrat.

Right now I'm having a problem, which is that I can't seem to get assert_select to see new page data if I call "visits" multiple times. assert_select keeps seeing the result of the first call to visits in my test. I'm using webrat 0.2.1 and Rails 2.1.

If I use the console and instantiate a new ActionController::Integration::Session.new and call "visits" and "assert_select" through that, then assert_select works and it sees each page I visited. Any ideas?



I haven't encountered the problem you describe. It's unusual that it behaves differently in the test than it does in an interactive console. Have you tried writing another version of the test as a simple integration test without using webrat? Does the test.log file tell you anything about the request parameters that webrat is generating when your test visits a page or submits a form?

Hope these ideas help you find a solution to your problem.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Comments are moderated, and will not appear until the author has approved them.

Your Information

(Name is required. Email address will not be displayed with the comment.)