From 51a07c892bd6ea6e000e6caabd360f44c7a2edd1 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Thu, 11 Oct 2012 14:58:45 -0700 Subject: [PATCH] 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. :) --- spec/support/matchers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 91a0731f..1bff50a9 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -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]