|
|
|
|
|
by rcoder
6059 days ago
|
|
Once you have a Javascript environment, it's not a large jump to emulate a minimal DOM -- see env.js, for example: http://ejohn.org/blog/bringing-the-browser-to-the-server/ With a stub DOM and Javascript interpreter, you can pass generated output from web application views directly into your testing environment and make assertions about the resulting behavior, dynamically-generated DOM nodes, etc. There are a number of projects similar to this one (for which, sadly, I cannot currently pull up any bookmarks) mostly intended for a similar set of tasks. Being able to bring RSpec or Cucumber to bear on a hairy JS testing job can make the process much more enjoyable. |
|