spec/helper.rb in pinboard-0.0.4 vs spec/helper.rb in pinboard-0.0.5
- old
+ new
@@ -10,11 +10,18 @@
def a_get(path)
a_request(:get, Pinboard.endpoint + path)
end
def stub_get(path)
- uri = "https://#{auth_params[:username]}:#{auth_params[:password]}@api.pinboard.in/v1/#{path}"
- stub_request(:get, uri)
+ stub_request(:get, uri(path))
+end
+
+def stub_post(path)
+ stub_request(:post, uri(path))
+end
+
+def uri(path)
+ "https://#{auth_params[:username]}:#{auth_params[:password]}@api.pinboard.in/v1/#{path}"
end
def fixture_path
File.expand_path("../fixtures", __FILE__)
end