Browse files

Fixed unit test

  • Loading branch information...
1 parent de98054 commit a8bf26b81b6ddf32972d7f133a09a18bfd705f75 @flavio flavio committed Dec 14, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 test/basic_test.rb
View
3 test/basic_test.rb
@@ -11,13 +11,12 @@ def setup
def test_it_by_watching
url = "http://google.com/search?q=wikipedia"
- uri = URI.parse url
log = Logger.new(STDOUT)
net_logger = NetObserver::Logger.new log
reply = File.read(File.join( File.dirname(__FILE__), "mocked_responses", "wikipedia"))
html_body = reply[reply.index("<html>")..reply.size]
- log.expects(:info).with(regexp_matches(/get request for url http?:\/\/#{uri.host}:#{uri.port}#{uri.path}\?#{uri.query} with method: GET with body /)).once
+ log.expects(:info).with("get request for url #{url} with method: GET with body ").once
# make sure response contents are printed too
log.expects(:warn).with(includes(html_body)).once

0 comments on commit a8bf26b

Please sign in to comment.