title: Access request and response headers in rspec
body: <p>I am testing <code>my model methods</code>, is there anyway i can access <code>request</code> or <code>response</code> headers.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>When i try to access my <code>response.code</code>, i get <code>undefined method/variable</code> response. How can i access my response headers.</p>
  
  <p>Update My Project Model:</p>
  
  <pre><code>class Project &lt; ActiveRestClient::Base  
    base_url "https://domainname.com"
  
    get :find, '/project/:id/'
  end
  </code></pre>