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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:57:52+00:00 2026-05-25T22:57:52+00:00

A project I’m working on fetches data from a 3rd party service and caches

  • 0

A project I’m working on fetches data from a 3rd party service and caches it locally along with specific info for my app.

My environment:

  • I provide a search mechanism against the service’s search API.
  • When a user browses to the item page for the first time, the my server fetches the info from the service and stores it
  • On subsequent requests the browser just requests the information from my server

.. however.. I want info from the 3rd party service to stay up to date.

My plan (feedback welcome!)

  • On a subsequent request after page load, some JS will ping the 3rd party service to check for updates
  • If the item has been updated, push an update to my copy server side

How to test this?

When I write a controller spec I don’t think the page’s javascript is executed (to fetch the since-updated item from the service)

I had quite a bit of trouble trying to describe this so a diagram might help.

enter image description here

Technology I’m using: Rails/RSpec/Factory Girl/JQuery

  • 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-05-25T22:57:52+00:00Added an answer on May 25, 2026 at 10:57 pm

    It looks like there are a few ways to test this assuming my current solution.

    Thoughtbot makes a library called capybara-webkit that will spin up webkit in the background and render/run your tests through it. Selenium is another.

    github link

    blog post

    back on this project after a bit of a hiatus.. using capybara and :js => true seems to work – some tricky timing issues, but otherwise good to go

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

Sidebar

Related Questions

our project uses HttpRuntime.Cache.Get and HttpRuntime.Cache.Insert for storing and retrieving data from the cache.
My project has a need to cache on the iOS device data retrieved from
My project consists of an app that links to two static libraries. Each of
The project that I am working on (Node.js) implies lots of operations with the
This project was coped almost exacatly from the example on the admob page but
Project I'm working on uses jQuery. I have a series of Ajax calls being
Project A contains a WPF Window (Data Entry Form) with a stack panel of
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Project in Delphi 2007, stored in SVN. Project settings - version info - there
Project was working on PC number 1. Copied project to external drive and trying

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.