Is Jets :: SpecHelpers :: Controllers :: Request` being cached?

When adding specs for my controllers i have noticed that it seems to keep cache between request for rspec requests.

After executing first a request that has headers specified, in the 2nd request below, that i dont have headers added. the Jets::SpecHelpers::Controllers::Request object has the previous request’s values

   it 'caches' do
      get '/api/v1/communications/:communication_id', { communication_id: 10, headers: { 'illigetcached': 'it will' } }
    end

    it "responds with 401 when no authacl header is passed" do
      byebug
      get '/api/v1/communications/:communication_id', { communication_id: 1231231233331 }
      expect(response.status).to eq 401
    end

this is the console output for request in the line of the 2nd spec where i added the byebug

#<Jets::SpecHelpers::Controllers::Request:0x0000565538b6a010 @method=:get, @path="/api/v1/communications/:communication_id", **@headers={:illigetcached=>"it will"}**, @params=#<Jets::SpecHelpers::Controllers::Params:0x0000565538b6a0d8 @path_params={:communication_id=>10}, @body_params={:communication_id=>10}, @query_params={:communication_id=>10}>>

is there a way for me to specify this request not to use any caching ? or is this a bug?

Thanks for pointing this out. This sounds like a bug. Will dig into it when I get a chance :+1: Unless someone else addresses it before me :smile:

1 Like

Done in:

Thank you!, Im not very familiar with spec core for em to send the PR.

very appreciated