I'm not sure which library needs to be fixed, but when I am attempting to unit test a ruby application, zombie originally crashed with an uncaught 'invalid URL' error. Tracing this down, it appears that the ruby views use the TurboLinks library, and this library likes to set the URL to an object rather than a string. It overrides 'toString()' so that it returns a valid URL, but in the attached image, you can see that URL is an object, and in 'trimControlCharacters', there is just a 'url.replace' instead of 'url.toString().replace'. My temporary fix as you can see from the screen shot was to just add toString() which solved my problem.
On my computer, this file is located at _nodemodules/whatwg-url-compat/lib/url.js
The ruby project under test is in my repository and all you have to do is this:
I'm not sure which library needs to be fixed, but when I am attempting to unit test a ruby application, zombie originally crashed with an uncaught 'invalid URL' error. Tracing this down, it appears that the ruby views use the TurboLinks library, and this library likes to set the URL to an object rather than a string. It overrides 'toString()' so that it returns a valid URL, but in the attached image, you can see that URL is an object, and in 'trimControlCharacters', there is just a 'url.replace' instead of 'url.toString().replace'. My temporary fix as you can see from the screen shot was to just add toString() which solved my problem.
On my computer, this file is located at _nodemodules/whatwg-url-compat/lib/url.js
The ruby project under test is in my repository and all you have to do is this: