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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:04:17+00:00 2026-05-26T18:04:17+00:00

How to write tests for alternative logging for Rails (tests for gem)? Not only

  • 0

How to write tests for alternative logging for Rails (tests for gem)? Not only unit tests, but also check functionality with rails. Maybe somebody know best way for such testing.

  • 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-26T18:04:18+00:00Added an answer on May 26, 2026 at 6:04 pm

    If you want to test the integration of a gem then you could do this with either rspec or cucumber or even test_unit if you wanted the process would be very similar.

    You essentially need to write some integration tests that are going to build a new rails application (you could do this by running the ‘rails new application’ command or by loading a pre-build rails application in your project). I would probably do the former and create a new rails application into a your_project_dir/tmp/test_rails_application and make sure you ignore the tmp dir in git. Also remove the application every time you run your integration tests.

    You now need to write some code to add your logging gem to the Gemfile and have the process run bundle to install the gem. Once you’ve done that you should be able to see where to go with this, you’ll be writing code to add code to your rails application, load up the application and assert your logging commands are getting written out to the log files.

    It’s not an overly difficult process but will require some thought about the best way to get it done.

    David

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

Sidebar

Related Questions

I do write unit tests while writing APIs and core functionalities. But I want
I'm trying to write tests for some legacy code with PHPUnit 3.4.9, but it
I'm using Jython to write tests for a Java project. It works well, but
Like it or not, occasionally you have have to write tests for classes that
I want to write unit tests with NUnit that hit the database. I'd like
I'm trying to write unit tests in MSTest and I've created two TestClasses. When
I'd like to start using unit tests, but I'm having a hard time understanding
I want to write tests for my app, though each time I look at
How to write tests where conditions like the following arise: Test user Input. Test
I'm using the Selenium Fitnesse Bridge Fixture in order to write tests in Fitnesse

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.