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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:44:39+00:00 2026-05-26T05:44:39+00:00

I am trying to re-write a unit test cases for a web application for

  • 0

I am trying to re-write a unit test cases for a web application for the test cases is not updated for long. The following is the error that I get when I run ‘rake test’.

Note: the web application is upgraded from 2.3.1 to 2.3.8 in mean while.

And the following is the stacktrace:

Loaded suite /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader

Started

/apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant’: uninitialized constant Mocha::Integration (NameError)

    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/testing/setup_and_teardown.rb:51:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/1.8/test/unit.rb:279
    from /apps/rails/website/install/local/ruby-1.8.7-p299/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5

please help me in this regard.

  • 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-26T05:44:40+00:00Added an answer on May 26, 2026 at 5:44 am

    This helped me in this regard:

    require 'mocha'
    require 'mocha/integration/test_unit'
    

    To be done in the test file, or in a helper if you are including one.

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

Sidebar

Related Questions

I'm trying to write a unit test for a module that will give me
I'm trying to write a unit test that will loop through all action methods
I'm trying to write a unit test that will raise an event on a
I'm trying to write a unit test for a piece of code that generates
I am trying to write a unit test for a client server application. To
I finished an app and after that I'm trying to write unit test to
I'm trying to write a unit test for an object that communicates with a
I am trying to write a unit test for a controller that has a
I have the following situation. I am trying to write a unit test for
I am trying to write a unit test for an action method which calls

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.