Cucumbers: stubs, layouts, or customer call records (Google maps)

I am wondering if this is possible. I use VCR stone (http://rubygems.org/gems/vcr) to record API calls in my models for my unit tests. It works great. For a higher level of testing, I use cucumber. In my application, I also test material with Google Maps markers, geocoder, etc. Therefore, I wonder if there is a solution to provide something like a VCR for the client side.

Maybe someone has some ideas,

thanks tux

[EDIT] I forgot to mention that I use Selenium to test javascript inside a cucumber. Therefore, JavaScript calls should also be mocked.

+3
source share
1 answer

Can you tune another configuration for your tests? Something like: var gmaps_url = test? "http: // localhost: 1234": "http://maps.google.com";

Another idea might be to use backbone-js (http://documentcloud.github.com/backbone/) in your javascript code. This makes unit test your javascript code easier.

0
source

All Articles