Permalink
Browse files

We cant use assert_block because its buggy in MiniTest and wont actua…

…lly show you the failure message you provide -- instead you just always get a "Expected block to return true"
  • Loading branch information...
1 parent a377221 commit 89f315bfb287f5428e78195e7c93c85c0892ab64 @dhh dhh committed Apr 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/testing/assertions/response.rb
@@ -42,7 +42,7 @@ def assert_response(type, message = nil)
elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
assert_block("") { true } # to count the assertion
else
- assert_block(build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code)) { false }
+ assert(false, build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code))
@tenderlove

tenderlove Apr 22, 2011

Owner

You could just use flunk here. :-)

@dhh

dhh via email May 4, 2011

Owner
end
end

1 comment on commit 89f315b

Contributor

radar commented on 89f315b May 4, 2011

FYI: This is caused by a regression in Ruby 1.9.2 which has a bug reported in Ruby's Redmine here: http://redmine.ruby-lang.org/issues/4368

Please sign in to comment.