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

  • SEARCH
  • Home
  • 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 8768585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:06:27+00:00 2026-06-13T17:06:27+00:00

i have a Rack app like this: app = Rack::Builder.new do map ‘/’ do

  • 0

i have a Rack app like this:

app = Rack::Builder.new do

    map '/' do
        # ...
    end

    map '/edit' do
        # ...
    end

end.to_app

How would i test it without long-tail installation/setup/learn process.

RSpec and minitest are really great, but i do not really want to learn nor setup them.

Is there something i cat just plug in and write/run tests right away in plain Ruby?

I want to write tests as simple as i wrote the app above, without advanced techniques and gotchas.

In KISS I Trust!

  • 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-13T17:06:28+00:00Added an answer on June 13, 2026 at 5:06 pm

    you can try Specular + Sonar bundle.

    Specular is for writing tests anywhere you need them.

    Sonar is a mock “browser” that communicate to your app, just like rack-test does, but with some unique features and simpler workflow.

    Using them is as simple as:

    ...
    app.to_app
    
    Spec.new do
      include Sonar
      app(app)
    
      get
      check(last_response.status) == 200
      # etc...
    end
    puts Specular.run
    

    so you put your specs right beside your app and write tests quickly in plain Ruby, without having to learn anything.

    see the full example running at CIBox

    (if it does not run automatically, click Run button)

    PS: writing Rack apps this way is kinda a pain.

    You can try a mapper, like Appetite one.

    so your app may look like this:

    class App < Appetite
      map :/
    
      def index
        'index'
      end
    
      def edit
        'edit'
      end
    end
    

    see the same example but with app built by Appetite here

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

Sidebar

Related Questions

I have a Rack application that looks like this: class Foo def initialize(app) @app
I have a very simple Ruby Rack server, like: app = Proc.new do |env|
I have a simple ruby server something like : app = Proc.new do |env|
I'd like to have MyMiddleware run in my Rack app, but only for certain
I have a config.ru for Rails 3.0.5 app like this : require ::File.expand_path('../config/environment', __FILE__)
I have a Sinatra app using Rack::Session::Cookie use Rack::Session::Cookie, :key => 'my.key', :path =>
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Say I have a Web service, called JokeService , which is a Rack/Rails3 app
All this weekend I have been trying to setup a Rails 3.0.4 app in
What advantages do I have with a Rack app over a sinatra app? thanks

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.