markevans/dragonfly — pull request #149 by balvig (2011-11-22 07:33:05+00:00)
Title: Inconsistency between hash generated in spec and actual hash shown in view in Ruby 1.9.2+

I am using rspec request specs to test for the presence of a particular dragonfly image like this:

```ruby
page.should have_css("img[src='#{post.photo.thumb('100x100')}']")
```
but for some reason even though the exact same code is found in the view, the spec fails because the hash generated in the spec and the one actually shown in the view are different.

The test passes in 1.8.7 but fails in 1.9.2+

I am not sure how the hashes are generated so just added a spec for now, but do you have any idea why that might be the case (or any workarounds to test for the presence of dragonfly images in the view?)

The difference is a matter of only 3 characters ("GVF" vs "GRl" in the middle of the url):

VIEW:
http://www.example.com/media/BAhbCVsHOgZmSSImMjAxMS8xMS8yMi8xNl8wM18zNV85ODlfcGhvdG8uanBnBjoGRVRbCDoGcDoMY29udmVydEkiES1hdXRvLW9yaWVudAY7BkZbCDsHOgp0aHVtYkkiDTEwMHgxMDAjBjsGVFsIOgZlOghqcGdJIhctc3RyaXAgLXF1YWxpdHkgODAGOwZG.jpg

SPEC:
http://www.example.com/media/BAhbCVsHOgZmSSImMjAxMS8xMS8yMi8xNl8wM18zNV85ODlfcGhvdG8uanBnBjoGRVRbCDoGcDoMY29udmVydEkiES1hdXRvLW9yaWVudAY7BkZbCDsHOgp0aHVtYkkiDTEwMHgxMDAjBjsGRlsIOgZlOghqcGdJIhctc3RyaXAgLXF1YWxpdHkgODAGOwZG.jpg