remove commented code and make assert_contain use a true assertion
This commit is contained in:
parent
a396758da4
commit
cdd390a19d
|
@ -55,14 +55,14 @@ module Webrat
|
|||
# the supplied string or regexp
|
||||
def assert_contain(content)
|
||||
hc = HasContent.new(content)
|
||||
raise Test::Unit::AssertionFailedError.new(hc.failure_message) unless hc.matches?(response_body)
|
||||
assert hc.matches?(response_body), hc.failure_message
|
||||
end
|
||||
|
||||
# Asserts that the body of the response
|
||||
# does not contain the supplied string or regepx
|
||||
def assert_not_contain(content)
|
||||
hc = HasContent.new(content)
|
||||
raise Test::Unit::AssertionFailedError.new(hc.negative_failure_message) if hc.matches?(response_body)
|
||||
assert !hc.matches?(response_body), hc.negative_failure_message
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -88,7 +88,6 @@ module ActionController #:nodoc:
|
|||
IntegrationTest.class_eval do
|
||||
include Webrat::Methods
|
||||
include Webrat::Selenium::Methods
|
||||
# include Webrat::Matchers
|
||||
include Webrat::Selenium::Matchers
|
||||
end
|
||||
end
|
||||
|
|
|
@ -254,6 +254,7 @@ describe Webrat::Matchers do
|
|||
end
|
||||
|
||||
describe "asserts for contains," do
|
||||
include Test::Unit::Assertions
|
||||
before(:each) do
|
||||
should_receive(:response_body).and_return @body
|
||||
require 'test/unit'
|
||||
|
|
Loading…
Reference in New Issue