Displaying 1 result from an estimated 1 matches for "assertselectwrapper".
2007 Feb 15
1
Specs for RJS HTML output NOT containing an element
...that
the unwanted output is in fact missing. should(_not)_have_tag
doesn''t work with RJS, and there''s no should_not_have from assert
select.
What I''ve just cobbled together is this addition to my spec_helper.rb:
module Spec
module Rails
class AssertSelectWrapper
def should_not_have(*opts)
begin
should_have(*opts)
rescue Spec::Expectations::ExpectationNotMetError
else
fail_with("Expected no matching elements but at least
one was detected.")
end...