test/test/test_helper.rb
def parsed_body(reload: false)
    if reload || !defined?(@_parsed_body) || !@_parsed_body
      return @_parsed_body = begin
        if Rails::VERSION::MAJOR >= 6
          @response.parsed_body
        else
          JSON.parse(@response.parsed_body)
        end
      end
    end

    return @_parsed_body
  end
# Expose parsed_body method on all controller tests.
Expose parsed_body method on all controller tests.
Expose parsed_body method on all controller tests .
def parsed_body(reload: false)
    if reload || !defined?(@_parsed_body) || !@_parsed_body
      return @_parsed_body = begin
        if Rails::VERSION::MAJOR >= 6
          @response.parsed_body
        else
          JSON.parse(@response.parsed_body)
        end
      end
    end
    return @_parsed_body
  end
def parsed_body ( reload : false ) if reload || ! defined? ( @_parsed_body ) || ! @_parsed_body return @_parsed_body = begin if Rails :: VERSION :: MAJOR >= 6 @response . parsed_body else JSON . parse ( @response . parsed_body ) end end end return @_parsed_body end
Expose parsed_body method on all controller tests.
Expose parsed_body method on all controller tests .
reload