{"action":"created","issue":{"url":"https://api.github.com/repos/seattlerb/minitest/issues/746","repository_url":"https://api.github.com/repos/seattlerb/minitest","labels_url":"https://api.github.com/repos/seattlerb/minitest/issues/746/labels{/name}","comments_url":"https://api.github.com/repos/seattlerb/minitest/issues/746/comments","events_url":"https://api.github.com/repos/seattlerb/minitest/issues/746/events","html_url":"https://github.com/seattlerb/minitest/issues/746","id":296695999,"number":746,"title":"Report on failure or error","user":{"login":"rhuanbarreto","id":283004,"avatar_url":"https://avatars1.githubusercontent.com/u/283004?v=4","gravatar_id":"","url":"https://api.github.com/users/rhuanbarreto","html_url":"https://github.com/rhuanbarreto","followers_url":"https://api.github.com/users/rhuanbarreto/followers","following_url":"https://api.github.com/users/rhuanbarreto/following{/other_user}","gists_url":"https://api.github.com/users/rhuanbarreto/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuanbarreto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuanbarreto/subscriptions","organizations_url":"https://api.github.com/users/rhuanbarreto/orgs","repos_url":"https://api.github.com/users/rhuanbarreto/repos","events_url":"https://api.github.com/users/rhuanbarreto/events{/privacy}","received_events_url":"https://api.github.com/users/rhuanbarreto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-13T11:00:39Z","updated_at":"2018-03-07T09:59:34Z","closed_at":"2018-03-07T09:59:34Z","author_association":"NONE","body":"How can I enable reporting on failure and error on the tests?\r\n\r\nIn [RailsGuides](http://guides.rubyonrails.org/testing.html#your-first-failing-test) they show the results on the example.\r\n\r\n```\r\n$ bin/rails test test/models/article_test.rb:6\r\nRun options: --seed 44656\r\n \r\n# Running:\r\n \r\nF\r\n \r\nFailure:\r\nArticleTest#test_should_not_save_article_without_title [/path/to/blog/test/models/article_test.rb:6]:\r\nExpected true to be nil or false\r\n \r\n \r\nbin/rails test test/models/article_test.rb:6\r\n \r\n \r\n \r\nFinished in 0.023918s, 41.8090 runs/s, 41.8090 assertions/s.\r\n \r\n1 runs, 1 assertions, 1 failures, 0 errors, 0 skips\r\n```\r\n\r\nBut when I run, the following error appears.\r\n\r\n```\r\n$ rails test test/integration/ip_controller_test.rb \r\nEmptying /Users/rhuan/rails-apps/vts/test/reports\r\nRun options: --seed 62241\r\n\r\n# Running:\r\n\r\n.F\r\n\r\nFailure:\r\nIPControllerTest#test_fail [/Users/rhuan/rails-apps/vts/test/integration/ip_controller_test.rb:10]:\r\nExpected nil to be truthy.\r\n\r\n\r\n/Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/railties-5.0.6/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_fail' for class `Minitest::Result' (NameError)\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/railties-5.0.6/lib/rails/test_unit/reporter.rb:70:in `format_rerun_snippet'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/railties-5.0.6/lib/rails/test_unit/reporter.rb:23:in `record'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:803:in `block in record'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:802:in `each'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:802:in `record'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:334:in `run_one_method'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:321:in `block (2 levels) in run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:320:in `each'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:320:in `block in run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:360:in `on_signal'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:347:in `with_info_handler'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:319:in `run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/railties-5.0.6/lib/rails/test_unit/line_filtering.rb:9:in `run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:159:in `block in __run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:159:in `map'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:159:in `__run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:136:in `run'\r\n\tfrom /Users/rhuan/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'\r\n```"},"comment":{"url":"https://api.github.com/repos/seattlerb/minitest/issues/comments/371086455","html_url":"https://github.com/seattlerb/minitest/issues/746#issuecomment-371086455","issue_url":"https://api.github.com/repos/seattlerb/minitest/issues/746","id":371086455,"user":{"login":"rhuanbarreto","id":283004,"avatar_url":"https://avatars1.githubusercontent.com/u/283004?v=4","gravatar_id":"","url":"https://api.github.com/users/rhuanbarreto","html_url":"https://github.com/rhuanbarreto","followers_url":"https://api.github.com/users/rhuanbarreto/followers","following_url":"https://api.github.com/users/rhuanbarreto/following{/other_user}","gists_url":"https://api.github.com/users/rhuanbarreto/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuanbarreto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuanbarreto/subscriptions","organizations_url":"https://api.github.com/users/rhuanbarreto/orgs","repos_url":"https://api.github.com/users/rhuanbarreto/repos","events_url":"https://api.github.com/users/rhuanbarreto/events{/privacy}","received_events_url":"https://api.github.com/users/rhuanbarreto/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T09:59:34Z","updated_at":"2018-03-07T09:59:34Z","author_association":"NONE","body":"Yes.\r\n\r\nJust to leave here how I solved the problem, I needed to pin the minitest version in order to work, once the rails team [don't publish bugfixes to old branches](http://guides.rubyonrails.org/maintenance_policy.html) (Is rails 5.0 really different that they can't maintain it? They rejected my pull request to 5.0 branch!)\r\n\r\nSo you need to put on your gemfile:\r\n```ruby\r\ngem 'minitest', '5.10.3'\r\n```\r\n\r\nHope that this will help someone."}}
{"actor":{"display_login":"rhuanbarreto"}}