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 8912047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:06:10+00:00 2026-06-15T04:06:10+00:00

We have a Rails App and a Sinatra API with separate codebases. They need

  • 0

We have a Rails App and a Sinatra API with separate codebases. They need to work together with the same database.

We can create a record using the API, and then display a page for that record using the Rails app. When creating the record using the API, there are many other records that need to be created at the same time. This all happens fine on the Rails app.

Here’s the problem: What is the best way to test that when the API creates the record, all the other records are created and the page renders properly on the Rails app?

I am writing a test in the Rails app for this. Since the API is separate from the Rails app, I can create a mock. But the mock needs to do everything the API would do, so it is not really a mock.

Is it possible (or practical) to include in the Rails app the API file that contains the call to create the record?

Or is there a better way to test for this?

  • 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-15T04:06:12+00:00Added an answer on June 15, 2026 at 4:06 am

    Well, you have two web applications. That is, two applications that expose a (more or less) public interface on the Net and that respond to HTTP calls.

    Why do not use a HTTP client to invoke all of the two servers and perform a complete test (a “workflow test”, if you like)?

    You can probably use any existing web testing tool for this, or write a test script with any language.

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

Sidebar

Related Questions

I have got Sinatra/Rails app and an action which starts some long process. Ordinary
I have a Rails app running Mongoid on Heroku and I need to set
I need to send a POST request from a sinatra app to a rails
I have Rails app with a Postgres backend. I need to add full text
I have a Sinatra application that responds to api calls, and a Rails application
I have a Rails app that I need to deploy. Here are the facts:
Consider a Rails app that hits a (Sinatra app) API being developed separately from
I have rails app which are working perfectly in the local computer. But when
I have a Rails app with the usual application_controller, and a controller (and model)
I have a Rails app that is served by Apache and Passenger, using only

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.