{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-core/issues/1995","labels_url":"https://api.github.com/repos/rspec/rspec-core/issues/1995/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-core/issues/1995/comments","events_url":"https://api.github.com/repos/rspec/rspec-core/issues/1995/events","html_url":"https://github.com/rspec/rspec-core/issues/1995","id":87854891,"number":1995,"title":"`match_array` not using proper item equality check (3.3.0)","user":{"login":"ahorner","id":116396,"avatar_url":"https://avatars.githubusercontent.com/u/116396?v=3","gravatar_id":"","url":"https://api.github.com/users/ahorner","html_url":"https://github.com/ahorner","followers_url":"https://api.github.com/users/ahorner/followers","following_url":"https://api.github.com/users/ahorner/following{/other_user}","gists_url":"https://api.github.com/users/ahorner/gists{/gist_id}","starred_url":"https://api.github.com/users/ahorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahorner/subscriptions","organizations_url":"https://api.github.com/users/ahorner/orgs","repos_url":"https://api.github.com/users/ahorner/repos","events_url":"https://api.github.com/users/ahorner/events{/privacy}","received_events_url":"https://api.github.com/users/ahorner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-06-12T21:16:02Z","updated_at":"2015-06-16T17:35:22Z","closed_at":"2015-06-16T06:27:18Z","body":"After upgrading to 3.3.0, I started seeing a handful of consistent spec failures.\r\n\r\n- Installed through `rspec-rails` version 3.3.0\r\n- Rails version 4.2.1\r\n- Using `infer_spec_type_from_file_location!`\r\n\r\n```\r\nFailure/Error: expect(cart.remove_entry(line_item.id)).to match_array([line_item])\r\n        expected collection contained:  [#<OrderLineItem id: 272, order_id: 300, unit_price_cents: 2, quantity: #<BigDecimal:7fbf32f3f338,'0.1E1',9(27)>, created_at: \"2015-06-12 21:07:45\", updated_at: \"2015-06-12 21:07:45\", price_book_entry_id: 460, discount_code_used: nil, position: 2, hidden: false>]\r\n        actual collection contained:    [#<OrderLineItem id: 272, order_id: 300, unit_price_cents: 2, quantity: #<BigDecimal:7fbf334d8c90,'0.1E1',9(18)>, created_at: \"2015-06-12 21:07:45\", updated_at: \"2015-06-12 21:07:45\", price_book_entry_id: 460, discount_code_used: nil, position: 2, hidden: false>]\r\n        the missing elements were:      [#<OrderLineItem id: 272, order_id: 300, unit_price_cents: 2, quantity: #<BigDecimal:7fbf32f3f338,'0.1E1',9(27)>, created_at: \"2015-06-12 21:07:45\", updated_at: \"2015-06-12 21:07:45\", price_book_entry_id: 460, discount_code_used: nil, position: 2, hidden: false>]\r\n        the extra elements were:        [#<OrderLineItem id: 272, order_id: 300, unit_price_cents: 2, quantity: #<BigDecimal:7fbf334d8c90,'0.1E1',9(18)>, created_at: \"2015-06-12 21:07:45\", updated_at: \"2015-06-12 21:07:45\", price_book_entry_id: 460, discount_code_used: nil, position: 2, hidden: false>]\r\n      # ./spec/models/cart_spec.rb:144:in `block (4 levels) in <top (required)>'\r\n```"},"comment":{"url":"https://api.github.com/repos/rspec/rspec-core/issues/comments/112508473","html_url":"https://github.com/rspec/rspec-core/issues/1995#issuecomment-112508473","issue_url":"https://api.github.com/repos/rspec/rspec-core/issues/1995","id":112508473,"user":{"login":"mockdeep","id":80543,"avatar_url":"https://avatars.githubusercontent.com/u/80543?v=3","gravatar_id":"","url":"https://api.github.com/users/mockdeep","html_url":"https://github.com/mockdeep","followers_url":"https://api.github.com/users/mockdeep/followers","following_url":"https://api.github.com/users/mockdeep/following{/other_user}","gists_url":"https://api.github.com/users/mockdeep/gists{/gist_id}","starred_url":"https://api.github.com/users/mockdeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mockdeep/subscriptions","organizations_url":"https://api.github.com/users/mockdeep/orgs","repos_url":"https://api.github.com/users/mockdeep/repos","events_url":"https://api.github.com/users/mockdeep/events{/privacy}","received_events_url":"https://api.github.com/users/mockdeep/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T17:35:21Z","updated_at":"2015-06-16T17:35:21Z","body":"Thanks, I'll give that a try. After thinking about it some more, though, I don't really agree with the idea that `==` needs to always be symmetric (or that RSpec should be enforcing it). In this case, saying `'submitted' == status` seems a little like saying \"doctor is a Bob\". It's a little unintuitive also to have to know that RSpec is going to compare things in the reverse order of what you specify."}}