Project

General

Profile

Actions

Refactor #13879

closed

Load mocha/minitest integration explicitly in test_helper

Added by Dominic Cleal over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

https://github.com/rails/rails/commit/fd6aaaa in Rails 4.2 will remove automatic loading of mocha from the Rails test helper, as it's expected that applications have an explicit dependency on it anyway if they want to use it.

Without it, mocha methods simply don't exist and tests fail with:

NoMethodError: undefined method `any_instance' for #<Class:0x000000070d2670>
    app/models/host.rb:15:in `method_missing'
    test/test_helper.rb:196:in `disable_orchestration'

Related issues 1 (0 open1 closed)

Blocks Foreman - Feature #13244: Upgrade Ruby on Rails to 4.2ClosedDominic Cleal01/15/2016Actions
Actions

Also available in: Atom PDF