assert_select outputs warnings to stderr about invalid HTML problems (something like a mismatching closing
Suppressing warnings in Ruby (in my case, assert_select)
Published July 11th, 2007 in Ruby and Rails.), yet the assertion still passes/fails as expected. So, instead of fixing the real problem by digging through our layout and partials rhtmls and find the mismatching
, I just want to suppress the warnings. :)
From http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/210670
def quietly
v = $VERBOSE
$VERBOSE = nil
yield ensure
$VERBOSE = v
end
then, in my casequietly{ assert_select “h1″ }
