I have some JavaScript code that references window.location.host to get the current host. This is valid JavaScript when running in a browser, but my RSpec tests are failing because therubyracer and/or V8 does not assume that browser/DOM features are necessary.
I have some JavaScript code that references
window.location.host
to get the current host. This is valid JavaScript when running in a browser, but my RSpec tests are failing because therubyracer and/or V8 does not assume that browser/DOM features are necessary.Here is a sample of the code I am working with:
How can I add support for the
window.location
object?