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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:42:07+00:00 2026-06-12T14:42:07+00:00

I’m developing a gem for Rails 3 and came across an error in my

  • 0

I’m developing a gem for Rails 3 and came across an error in my test suit when running it under Ruby 1.8.7 at travis-ci.org:

/home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:874:in `_run_suite': undefined method `run' for #<TestActivist:0xb6936dd4> (NoMethodError)
69  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:866:in `map'
70  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:866:in `_run_suite'
71  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:853:in `_run_suites'
72  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:853:in `map'
73  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:853:in `_run_suites'
74  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:826:in `_run_anything'
75  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:1015:in `run_tests'
76  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:1002:in `send'
77  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:1002:in `_run'
78  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:1001:in `each'
79  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:1001:in `_run'
80  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:990:in `run'
81  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/minitest-3.5.0/lib/minitest/unit.rb:748:in `autorun'
82  from /home/travis/.rvm/gems/ruby-1.8.7-p370/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:21
83rake aborted!
84Command failed with status (1): [/home/travis/.rvm/rubies/ruby-1.8.7-p370/b...]

this is a link to the failing job: https://travis-ci.org/#!/pokonski/public_activity/jobs/2586051

Everything works just fine in Ruby > 1.8.7.

My relevant part of .gemspec:

  s.add_dependency 'activerecord', '>= 3.0.0'
  s.add_dependency 'activesupport', '>= 3.0.0'
  s.add_dependency 'actionpack', '>= 3.0.0'
  s.add_dependency 'i18n', '>= 0.5.0'

  if RUBY_VERSION == "1.8.7"
    s.add_development_dependency 'minitest', '>= 3.2.0'
  else
    s.add_development_dependency 'simplecov', '>= 0.6.4'
  end

  s.add_development_dependency 'bundler', '>= 1.1'
  s.add_development_dependency 'rake', '>= 0.9'
  s.add_development_dependency 'sqlite3'
  s.add_development_dependency 'mocha', '>= 0.12.1'
  s.add_development_dependency 'rails', '>= 3.0.0' # generators test

and Gemfile:

source :rubygems

gemspec

gem 'yard'

What’s interesting, when running the tests locally with ruby-1.8.7-p370 I get an error with a different missing method:

test_resolving_values(TestCommon):
NoMethodError: undefined method `mock' for #<TestCommon:0x7ffdc8a79388>
    /home/piotrek/projekty/public_activity/test/test_common.rb:85:in `test_resolving_values'

More source code for the failing lines: https://github.com/pokonski/public_activity/blob/master/test/test_common.rb#L85

Anyone have a clue what’s going on?

  • 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-12T14:42:09+00:00Added an answer on June 12, 2026 at 2:42 pm

    Turns out it was because of the test_generators.rb which used Rails::Generators::TestCase, which in turn inherited from TestUnit.

    Mocha was incorrectly monkey patching Test::Unit instead of MiniTest because of this. The solution was to require test_helper in test_generators.rb and force MiniTest gem to the 3.2.0 version.

    Full solution in this commit: https://github.com/pokonski/public_activity/commit/731e953068297c7aa6f6f7e2b2251c79843943a1

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.