In my app I’d like to send a request to google sitemaps indexer after
a new post is created.
This would take place in the post_observer and would look something
class PostObserver < ActiveRecord::Observer
default_url_options[:host] = “mydomain.com”
Net::HTTP.get(‘www.google.com’, ‘/ping?sitemap=’ + URI.escape
How could I write a test for this?
Also - how could I disable the actual request while running in test