Update spec/support/matchers.rb

Rubinius does not yet destructure block (or method) arguments in 1.9 mode. This change makes the specs pass on Rubinius. It's not clear to me why destructering is being used here. Ruby will already destructure a single Array-ish argument into separate block argument locals. In this case, unless you want, give `a, b` passed, `name, content = a` and NOT `name, content = a, b`, the unparenthesized (ie non-extra-level-destructuring) should work fine. If that makes any sense. :)
This commit is contained in:
Brian Ford 2012-10-11 14:58:45 -07:00
parent 1583e089da
commit 51a07c892b

View File

@ -26,7 +26,7 @@ end
RSpec::Matchers.define :deliver_result_image_for do |name|
match do |response|
actual = files.detect do |(name, content)|
actual = files.detect do |name, content|
response.body.to_s.force_encoding('ascii') == content.to_s.force_encoding('ascii') # TODO ummmmmmmm?
end
actual = actual && actual[0]