{"action":"closed","issue":{"url":"https://api.github.com/repos/rspec/rspec-core/issues/2266","repository_url":"https://api.github.com/repos/rspec/rspec-core","labels_url":"https://api.github.com/repos/rspec/rspec-core/issues/2266/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-core/issues/2266/comments","events_url":"https://api.github.com/repos/rspec/rspec-core/issues/2266/events","html_url":"https://github.com/rspec/rspec-core/issues/2266","id":158910147,"number":2266,"title":"run_all_when_everything_filtered not working as expected","user":{"login":"constantm","id":292439,"avatar_url":"https://avatars.githubusercontent.com/u/292439?v=3","gravatar_id":"","url":"https://api.github.com/users/constantm","html_url":"https://github.com/constantm","followers_url":"https://api.github.com/users/constantm/followers","following_url":"https://api.github.com/users/constantm/following{/other_user}","gists_url":"https://api.github.com/users/constantm/gists{/gist_id}","starred_url":"https://api.github.com/users/constantm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/constantm/subscriptions","organizations_url":"https://api.github.com/users/constantm/orgs","repos_url":"https://api.github.com/users/constantm/repos","events_url":"https://api.github.com/users/constantm/events{/privacy}","received_events_url":"https://api.github.com/users/constantm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-07T12:26:33Z","updated_at":"2016-06-07T16:05:48Z","closed_at":"2016-06-07T16:05:48Z","body":"I've tried implementing `run_all_when_everything_filtered` along with `rspec-retry` so that retries only run individual examples instead of whole specs on retry. \r\n\r\nOn the first run of the spec with `rspec --only-failures`, it will find no failing tests and hence all examples will be filtered out. I was expecting the `run_all_when_everything_filtered` option to counteract this, and actually run the tests. \r\n\r\nAm I doing something wrong, or am I misunderstanding how `run_all_when_everything_filtered` works?\r\n\r\nMy config, shortened for brevity:\r\n\r\n```ruby\r\n# spec/spec_helper.rb\r\nRSpec.configure do |config|\r\n  config.example_status_persistence_file_path = \"examples.txt\"\r\n  config.run_all_when_everything_filtered = true\r\nend\r\n```\r\n\r\n\r\n```\r\n# rspec --only-failures\r\nRun options: include {:last_run_status=>\"failed\"}\r\n\r\nAll examples were filtered out\r\n\r\nRandomized with seed 31670\r\n\r\nFinished in 1.82 seconds (files took 17.43 seconds to load)\r\n0 examples, 0 failures\r\n\r\nRandomized with seed 31670\r\n```\r\n\r\nI'm using Rspec version 3.4.4\r\n\r\n**UPDATE**: Just had a look at the Rspec code, and it seems it's happening because of [this line](https://github.com/rspec/rspec-core/blob/350c21b6f66a54267ff615ed16604e017122e6be/lib/rspec/core/world.rb#L137). It actually ignores `run_all_when_everything_filtered ` if the tests are being run with `--only-failures`. Why would this be?"}}
{"actor":{"display_login":"myronmarston"}}