apneadiving/Google-Maps-for-Rails — Issue #125: Error while testing using Capybara with Selenium driver and rpec
Author: chandranshu12
Created: 2011-12-05 03:17:14+00:00
State: open

Hi

I have a rails application and am using Gmaps4rails to render a map. I am providing users some options to choose which markers will be displayed. All this functionality is working fine across all browsers.

However, when I'm testing this through capybara with selenium driver, no markers are getting hidden. After running the debugger, I found the following error in the error console:
```
console is not defined
http://127.0.0.1:51643/javascripts/gmaps4rails/gmaps4rails.googlemaps.js?1323052026 Line 196
```

Opening line 196 in this file, I find a call to console.log in the clearMarkers method call:
```javascript
Gmaps4RailsGoogle.prototype.clearMarker = function(marker) {
console.log(marker);
return marker.serviceObject.setMap(null);
};
```

I then noticed that during normal operation, a no. of such log messages are displayed in the firebug console. Should the console.log() call be there? If yes, what's the way to test it with a rendering engine?