I am testing my model methods
, is there anyway i can access request
or response
headers.
require 'spec_helper'
describe Project do
it "can find an Project that this user belongs to" do
project = Project.find( id: '22', authorization: @auth ) // Rest API Call
expect(response.code).to eq(200);
end
end
When i try to access my response.code
, i get undefined method/variable
response. How can i access my response headers.
Update My Project Model:
class Project < ActiveRestClient::Base
base_url "https://domainname.com"
get :find, '/project/:id/'
end