Project

General

Profile

Actions

Defect #40551

closed

Unit tests fail with Mocha 2.2.0

Added by Vincent Robert 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

After updating all gems, one of the unit tests no longer passes.

bundle update
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Fetching rake 13.2.1 (was 13.2.0)
Installing rake 13.2.1 (was 13.2.0)
Fetching json 2.7.2 (was 2.7.1)
Fetching nokogiri 1.16.4 (x86_64-darwin) (was 1.16.3)
Fetching reline 0.5.1 (was 0.5.0)
Fetching mocha 2.2.0 (was 2.1.0)
Fetching css_parser 1.17.1 (was 1.16.0)
Installing json 2.7.2 (was 2.7.1) with native extensions
Installing css_parser 1.17.1 (was 1.16.0)
Installing reline 0.5.1 (was 0.5.0)
Installing mocha 2.2.0 (was 2.1.0)
Installing nokogiri 1.16.4 (x86_64-darwin) (was 1.16.3)
Bundle updated!
bundle exec rails test test/unit/issue_test.rb:704

Run options: --seed 43846

# Running:

F

Failure:
IssueTest#test_assigning_attributes_should_assign_project_and_tracker_first [app/models/issue.rb:478]:
unexpected invocation: subject=(Test)

bin/rails test test/unit/issue_test.rb:704

Finished in 5.971339s, 0.1675 runs/s, 0.1675 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
Minitest::Assertion: unexpected invocation: subject=(Test)
app/models/issue.rb:478:in `assign_attributes'
app/models/issue.rb:482:in `attributes='
test/unit/issue_test.rb:714:in `block in test_assigning_attributes_should_assign_project_and_tracker_first'
test/unit/issue_test.rb:713:in `test_assigning_attributes_should_assign_project_and_tracker_first'
Actions #1

Updated by Vincent Robert 7 months ago

After reverting to Mocha 2.1.0, the test passed successfully.

group :test do
  gem 'mocha', '2.1.0'
Actions #2

Updated by Vincent Robert 7 months ago

  • Subject changed from Unit tests fail with the latest gem versions to Unit tests fail with Mocha 2.2.0
Actions #3

Updated by Vincent Robert 6 months ago

  • Status changed from New to Closed

I'm closing this issue, as it has been fixed by Go MAEDA in #40603

Actions

Also available in: Atom PDF