Lille
2012-Apr-15 20:09 UTC
including third party javascript API in Rails 3.1 works in server mode, but not when testing
Hey, I can use google maps api v3 in my Rails 3.1 app in development by including the following in the layouts/application header: <script src="https://maps.googleapis.com/maps/api/js?key=[...my key here...]&sensor=false&libraries=places" type="text/javascript"></ script> But when I integration test my app (capybara-webkit) I get a js error associated with an object that the api should be initializing. In the past I had tried to skirt this problem by just including in a separate file the actual script generated by the src address from above -- but the approach is not viable when you need to authenticate to the third party api. It seems to me this is a rails 3 issue, and not a test framework specific issue. I figure anyone else who has integration-tested many mashup apps using Rails will have met this problem. What did you do? Thanks, Lille -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.