Permalink
Browse files

Added the call method to the request class.

  • Loading branch information...
1 parent 5050123 commit 3e7ee269f4dd9d43880d62401d8824fcc92067e1 @kevintuhumury kevintuhumury committed Mar 18, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 lib/cameraplus/request.rb
  2. +1 −1 spec/cameraplus/request_spec.rb
@@ -6,6 +6,10 @@ class Request
format :json
+ def self.call(url, options = {})
+ new(url, options).response
+ end
+
def initialize(url, options = {})
@url = url
@options = options
@@ -20,7 +20,7 @@
use_vcr_cassette :request_api
- let(:response) { subject.new("/user/mostlylisa:pages").response }
+ let(:response) { subject.call("/user/mostlylisa:pages") }
it "should have a response" do
response.should_not be_nil

0 comments on commit 3e7ee26

Please sign in to comment.