Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:02:17+00:00 2026-06-04T18:02:17+00:00

I am testing and coding a sinatra app using minitest. Currently, I use last_response.status

  • 0

I am testing and coding a sinatra app using minitest. Currently, I use last_response.status to see what happened with the request by:

assert last_response.ok?, "Status 200 expected but was #{last_response.status}."

which displays errors like “Status 200 expected but was 500.” but I would like to display the sinatra.error in Rack ENV, like:

sinatra.error #<ArgumentError: wrong number of arguments (1 for 2)>

so that I don’t have to start the app and check it on the browser. I tried this code:

assert last_response.ok?, "#{last_response.error}."

but it threw a “private method `error’ called for #” error.

How can I display the values of the variables in sinatra error output?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:02:18+00:00Added an answer on June 4, 2026 at 6:02 pm

    You can use puts last_response.errors to show the Rack error messages for the last response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a multi-threaded application, I use the following ASSERT macro to catch coding and
In general the SDLC has the following phase requirement gathering design coding testing deployment
I testing the deployment of my project using clickonce. Boy was I in for
I've recently updated to a testing distribution, which is now using GCC 4.4.3. Now
I am testing Paypal's masspay using their ' MassPay NVP example ' and I
First let me just state that coding without unit testing is just plain crazy.
I am working on an Android project in Eclipse and debugging / testing using
I am using THIS article and example for testing my gps. And first of
I followed this tutorial : http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/ and I got the alert 'Text messaging is
Currently coding a mates portfolio and not to my surprise the code isn't loading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.