Skip to content

Commit

Permalink
Revert "remove commented code and make assert_contain use a true asse…
Browse files Browse the repository at this point in the history
…rtion"

This reverts commit 114db434182bbf9ad5b2737d181048bab363f055.
  • Loading branch information
adkron committed Jan 14, 2009
1 parent cdd390a commit 9745673
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/webrat/core/matchers/have_content.rb
Expand Up @@ -55,14 +55,14 @@ def contain(content)
# the supplied string or regexp
def assert_contain(content)
hc = HasContent.new(content)
assert hc.matches?(response_body), hc.failure_message
raise Test::Unit::AssertionFailedError.new(hc.failure_message) unless hc.matches?(response_body)
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)
assert !hc.matches?(response_body), hc.negative_failure_message
raise Test::Unit::AssertionFailedError.new(hc.negative_failure_message) if hc.matches?(response_body)
end

end
Expand Down
1 change: 1 addition & 0 deletions lib/webrat/selenium.rb
Expand Up @@ -88,6 +88,7 @@ module ActionController #:nodoc:
IntegrationTest.class_eval do
include Webrat::Methods
include Webrat::Selenium::Methods
# include Webrat::Matchers
include Webrat::Selenium::Matchers
end
end
1 change: 0 additions & 1 deletion spec/public/matchers_spec.rb
Expand Up @@ -254,7 +254,6 @@
end

describe "asserts for contains," do
include Test::Unit::Assertions
before(:each) do
should_receive(:response_body).and_return @body
require 'test/unit'
Expand Down

0 comments on commit 9745673

Please sign in to comment.