Skip to content

Commit

Permalink
make asserts count for have_selector
Browse files Browse the repository at this point in the history
  • Loading branch information
adkron committed Jan 14, 2009
1 parent 3707262 commit e864d56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/webrat/core/matchers/have_selector.rb
Expand Up @@ -38,14 +38,14 @@ def have_selector(expected, &block)
# the supplied selector
def assert_have_selector(expected)
hs = HaveSelector.new(expected)
raise Test::Unit::AssertionFailedError.new(hs.failure_message) unless hs.matches?(response_body)
assert hs.matches?(response_body), hs.failure_message
end

# Asserts that the body of the response
# does not contain the supplied string or regepx
def assert_have_no_selector(expected)
hs = HaveSelector.new(expected)
raise Test::Unit::AssertionFailedError.new(hs.negative_failure_message) if hs.matches?(response_body)
assert !hs.matches?(response_body), hs.negative_failure_message
end

end
Expand Down

0 comments on commit e864d56

Please sign in to comment.