where to use byebug in rspecs

  describe "Get#index" do

    # let!(:contacts) { create :contact_us, account: account  }

    # before { get endpoint}

    it 'returns list of Taxes' do

      get TAX_URL, headers: @headers

      byebug

      json_data = json_response(response)

      expect(response.status).to eq 200

    end

  end


.........................................................


we should use byebug in rails in rspecs -------  after request go

after this 

      get TAX_URL, headers: @headers

otherwise there will be nothing in response if - -------------------

  describe "Get#index" do

    # let!(:contacts) { create :contact_us, account: account  }

    # before { get endpoint}

    it 'returns list of Taxes' do

              byebug

      get TAX_URL, headers: @headers

      json_data = json_response(response)

      expect(response.status).to eq 200

    end

  end


Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5