bglusman/rstat.us — pull request #1 by clnclarinet (2012-01-18 03:51:45+00:00)
Title: Elasticsearch

Hi Brian,

I tried a few different combinations of VCR settings, and this one didn't seem to cause the connection not allowed errors. ([VCR's documentation](https://www.relishapp.com/myronmarston/vcr) is AWESOME)

Now it looks like the error is that in the view, during tests (you're right that it seems to work with manual testing), @updates.each is not an Update, it's nil. When I inspect @updates at that point, I get something that looks like this:

#5, "timed_out"=>false, "_shards"=>{"total"=>5, "successful"=>5, "failed"=>0},
"hits"=>{"total"=>7, "max_score"=>1.2801316, "hits"=>[{"_index"=>"mongo-updates", "_type"=>"update", "_id" =>"4f163d4428043b6bf100080e", "_score"=>1.2801316, "_source"=>{"author_id"=>"4f163d432
8043b6bf10007f5", "created_at"=>"2012-01-18T03:32:20Z", "feed_id"=>"4f163d4328043b6bf1
0007f7", "id"=>"4f163d4428043b6bf100080e", "mention_ids"=>[], "referral_id"=>"", "tags
"=>["coolstorybro"], "text"=>"So this one time #coolstorybro", "twitter"=>true, "updat
ed_at"=>"2012-01-18T03:32:20Z"}}, .... etc

I haven't dug into yet what this has in development mode and why this might be different in test mode and how you're supposed to get objects back from ElasticSearch.

Sooo still 7 errors, but different errors? :D