Skip to content
Browse files

fix failing tests... heh

  • Loading branch information...
1 parent 2bbffc1 commit 97e95dc807c81f5c448943224bdee3699b4a2219 @jamesgolick committed May 6, 2009
Showing with 5 additions and 0 deletions.
  1. +2 −0 test/session_test.rb
  2. +3 −0 test/test_helper.rb
View
2 test/session_test.rb
@@ -29,6 +29,7 @@ def setup
stub(@session).last_response do
response = RestClient::Response.new("", stub!)
stub(response).cookies { {} }
+ stub(response).code { 200 }
end
@session.trample
end
@@ -43,6 +44,7 @@ def setup
stub(RestClient).get(anything, anything) do
response = RestClient::Response.new("", stub!)
stub(response).cookies { {"xyz" => "abc"} }
+ stub(response).code { 200 }
end
@config = Trample::Configuration.new do
View
3 test/test_helper.rb
@@ -19,6 +19,7 @@ def mock_get(url, opts={})
mock(RestClient).get(url, :cookies => opts[:cookies] || {}).times(opts[:times]) do
response = RestClient::Response.new("", stub!)
stub(response).cookies { opts[:return_cookies] || {} }
+ stub(response).code { 200 }
end
end
@@ -27,13 +28,15 @@ def mock_post(url, opts={})
:cookies => opts[:cookies] || {}).times(opts[:times]) do
response = RestClient::Response.new("", stub!)
stub(response).cookies { opts[:return_cookies] || {} }
+ stub(response).code { 200 }
end
end
def stub_get(url, opts = {})
stub(RestClient).get(url, :cookies => opts[:cookies] || {}).times(opts[:times]) do
response = RestClient::Response.new("", stub!)
stub(response).cookies { opts[:return_cookies] || {} }
+ stub(response).code { 200 }
end
end
end

0 comments on commit 97e95dc

Please sign in to comment.
Something went wrong with that request. Please try again.