class Spec::Rails::Matchers::AssertSelect
def matches?(response_or_text, &block)
def matches?(response_or_text, &block) if ActionController::TestResponse === response_or_text and response_or_text.headers.key?('Content-Type') and !response_or_text.headers['Content-Type'].blank? and response_or_text.headers['Content-Type'].to_sym == :xml @args.unshift(HTML::Document.new(response_or_text.body, false, true).root) elsif String === response_or_text @args.unshift(HTML::Document.new(response_or_text).root) end @block = block if block begin @spec_scope.send(@assertion, *@args, &@block) rescue ::Test::Unit::AssertionFailedError => @error end @error.nil? end