Module: FavoriteSpecMixin

Defined in:
lib/vendor/twitter/spec/twitter/client/favorites_spec.rb

Instance Method Summary collapse

Instance Method Details

#connection=(connection) ⇒ Object



92
93
94
# File 'lib/vendor/twitter/spec/twitter/client/favorites_spec.rb', line 92

def connection=(connection)
  @connection = connection
end

#create_uri(method, id) ⇒ Object



88
89
90
# File 'lib/vendor/twitter/spec/twitter/client/favorites_spec.rb', line 88

def create_uri(method, id)
  "#{@base_uri}/#{method.to_s}/#{id.to_i.to_s}.json"
end

#finalizeObject



96
97
98
# File 'lib/vendor/twitter/spec/twitter/client/favorites_spec.rb', line 96

def finalize
  nilize(@uri, @request, @twitter, @default_header, @response, @error_response, @connection)
end

#initObject



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/vendor/twitter/spec/twitter/client/favorites_spec.rb', line 75

def init
  @base_uri = '/favourings'
  @request = mas_net_http_get(:basic_auth => nil)
  @twitter = client_context
  @default_header = @twitter.send(:http_header)
  @response = mas_net_http_response(:success)
  @connection = mas_net_http(@response)
  Net::HTTP.stub!(:new).and_return(@connection)
  @id = 234923423
  @status = mas_twitter_status(:id => @id, :to_i => @id)
  Twitter::Status.stub!(:unmarshal).and_return(@status)
end