Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error: aggregated_results: wrong number of arguments (given 1, expected 0) #689

Closed
jasnow opened this issue May 10, 2017 · 14 comments
Assignees

Comments

@jasnow
Copy link

jasnow commented May 10, 2017

Steps to reproduce:

  1. Run "rake" before upgrade and it is error-free for this repo:
    https://github.com/jasnow/rt_demo_app
    • Have 14 repos with this error, but not all repos.
  2. Run "bundle update minitest" (5.10.1 to 5.10.2) and run "rake" and get this:
Finished in 0.316243s, 50.5940 runs/s, 88.5395 assertions/s.
.../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:597:in `report'
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:687:in `each'
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:687:in `report'
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:141:in `run'
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:72:in `run'
	from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:63:in `block in autorun'
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

Environment:

  • Mac OS/X 10.12.4
  • Ruby 2.4.1
  • Rails 5.0.2

If you need more, just leave me a comment. Thanks.

@memiux
Copy link

memiux commented May 10, 2017

same

$ bin/rails t
Run options: --seed 32310

# Running:

..................................................

Finished in 5.878209s, 8.5060 runs/s, 26.5387 assertions/s.
.../vendor/bundle.dev/ruby/2.4.0/gems/railties-5.1.0/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from .../vendor/bundle.dev/ruby/2.4.0/gems/minitest-5.10.2/lib/minitest.rb:597:in `report'

@zenspider
Copy link
Collaborator

This is a bug in rails and has been fixed:

rails/rails#29022

@espen
Copy link

espen commented May 10, 2017

Should perhaps minitest 5.10.2 be yanked? I don't blame the minitest authors for this error but given that Rails depends on minitest (minitest (~> 5.1)) and now, due to the popularity of Rails, a lot of devs will encounter this error I think the best thing would be to wait until Rails is released with the bugfix mentioned above. And perhaps release the current minitest as 5.2.0 to avoid the issue for Rails projects and still give others the option of using the latest version of minitest?

@zenspider
Copy link
Collaborator

No, minitest should not be yanked because of a bug in rails. You can pin in your Gemfile if you want, or wait for a release from the rails team. Talking to @tenderlove about it now, but apparently he's dealing with a dead scooter 🛴 at the moment.

@zenspider zenspider self-assigned this May 10, 2017
@espen
Copy link

espen commented May 10, 2017

I'm not worried about my project @zenspider. We both agree that this is a bug in Rails. However my concern is all the newbies using Rails now encountering this issue. I don't think they will know how to pin a minitest version in the Gemfile or find this thread.

Thanks for following up on this. Hopefully @tenderlove's scooter will get a green integration test too.

@rexmortus
Copy link

rexmortus commented May 12, 2017

Hey everyone! Thanks for jumping on this.

Until there's a new release out, can anyone suggest a path forward here?

While I appreciate everyone's comments, it's not clear to me (someone not familiar with Rails) what I should actually do at this point to resolve this.

@zenspider
Copy link
Collaborator

@rexmortus good question!

  1. rails is doing a release tomorrow to fix this issue
  2. You can "pin" minitest to the previous version in your Gemfile and re-bundle.

Add a line like

gem "minitest", "5.10.1"

in the test/development group in your Gemfile and run bundle again.

@rexmortus
Copy link

@zenspider thanks mate, it's much appreciated.

k2works added a commit to k2works/etude_for_rails that referenced this issue May 12, 2017
@jasnow
Copy link
Author

jasnow commented May 13, 2017

@zenspider - Removed all my "pins" during my Rails upgrades. Now no error messages.

@zenspider
Copy link
Collaborator

Fantastic. Thank you for the update.

@jasnow
Copy link
Author

jasnow commented May 14, 2017

@zenspider - You are welcome. Until next time....

@abebraham
Copy link

abebraham commented May 29, 2017

Thanks a lot you guys!

I am just starting out with Rails and this issue was really taking the motivation/fun from learning. All I had to do was bundle update & bundle install with the previously mentioned gem (gem "minitest", "5.10.1")

For those new like myself here you go:

group :test do
  gem 'rails-controller-testing', '0.1.1'
  gem 'minitest-reporters',       '1.1.9'
  gem 'guard',                    '2.13.0'
  gem 'guard-minitest',           '2.4.4'
  gem "minitest",                 '5.10.1'
end

@zenspider
Copy link
Collaborator

@abebraham you don't have to do that now. you can update rails to 5.0.3.

davidbasalla added a commit to alphagov/whitehall that referenced this issue Jun 5, 2017
I was getting the same problem as minitest/minitest#689, the minor version bump should fix it.
davidbasalla added a commit to alphagov/whitehall that referenced this issue Jun 6, 2017
I was getting the same problem as minitest/minitest#689, the minor version bump should fix it.
davidbasalla added a commit to alphagov/whitehall that referenced this issue Jun 7, 2017
I was getting the same problem as minitest/minitest#689, the minor version bump should fix it.
davidbasalla added a commit to alphagov/whitehall that referenced this issue Jun 12, 2017
I was getting the same problem as minitest/minitest#689, the minor version bump should fix it.
@mixflame
Copy link

mixflame commented Jul 10, 2017

still an issue in rails 5.1.0 it seems...

/Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/railties-5.1.0/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/minitest-5.10.2/lib/minitest.rb:597:in `report'
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/minitest-5.10.2/lib/minitest.rb:687:in `each'
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/minitest-5.10.2/lib/minitest.rb:687:in `report'
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/minitest-5.10.2/lib/minitest.rb:141:in `run'
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/railties-5.1.0/lib/rails/test_unit/minitest_plugin.rb:77:in `run'
	from /Users/jonathansilverman/.rvm/gems/ruby-2.4.1@fwi/gems/minitest-5.10.2/lib/minitest.rb:63:in `block in autorun'

rubenarakelyan pushed a commit to alphagov/whitehall that referenced this issue Jul 12, 2017
I was getting the same problem as minitest/minitest#689, the minor version bump should fix it.
siruguri added a commit to UrbanStrategies/goalgetterapp that referenced this issue Jan 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

7 participants