{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-expectations/issues/958","repository_url":"https://api.github.com/repos/rspec/rspec-expectations","labels_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/958/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/958/comments","events_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/958/events","html_url":"https://github.com/rspec/rspec-expectations/issues/958","id":195876358,"number":958,"title":"Argument matches weirdness around time with activesupport","user":{"login":"rwz","id":129043,"avatar_url":"https://avatars.githubusercontent.com/u/129043?v=3","gravatar_id":"","url":"https://api.github.com/users/rwz","html_url":"https://github.com/rwz","followers_url":"https://api.github.com/users/rwz/followers","following_url":"https://api.github.com/users/rwz/following{/other_user}","gists_url":"https://api.github.com/users/rwz/gists{/gist_id}","starred_url":"https://api.github.com/users/rwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwz/subscriptions","organizations_url":"https://api.github.com/users/rwz/orgs","repos_url":"https://api.github.com/users/rwz/repos","events_url":"https://api.github.com/users/rwz/events{/privacy}","received_events_url":"https://api.github.com/users/rwz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-12-15T18:13:18Z","updated_at":"2016-12-15T22:01:19Z","closed_at":"2016-12-15T22:01:19Z","body":"Using rspec-expectations 3.5.0 on ruby 2.3.3\r\n\r\n```ruby\r\nit \"should fail\" do\r\n  my_double = double\r\n  expect(my_double).to receive(:call).with(time: Time.utc(2016, 8, 8, 0, 0, 24))\r\n  my_double.call time: \"2016-08-08T00:00:24Z\"\r\nend\r\n```\r\n\r\nThis fails as expected when used without activesupport. If you `require \"activesupport/all\"` (I tried versions 4.2 and 5.0), the spec begins to pass though.\r\n\r\nI couldn't find any documentation on how to make method expectation perform exact match and had to come up with the following workaround:\r\n\r\n```ruby\r\nRSpec::Matchers.define :exactly do |expected|\r\n  match { |actual| actual == expected }\r\nend\r\n\r\nexpect(my_double).to receive(:call).with(exactly(time: Time.utc(2016, 8, 8, 0, 0, 24)))\r\n```\r\n\r\nI believe this behavior can produce dangerous bugs and undermine developers confidence in their test setups. I also think that exact match should be an option or if it already is, it should be better discoverable in documentation."},"comment":{"url":"https://api.github.com/repos/rspec/rspec-expectations/issues/comments/267457162","html_url":"https://github.com/rspec/rspec-expectations/issues/958#issuecomment-267457162","issue_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/958","id":267457162,"user":{"login":"myronmarston","id":49391,"avatar_url":"https://avatars.githubusercontent.com/u/49391?v=3","gravatar_id":"","url":"https://api.github.com/users/myronmarston","html_url":"https://github.com/myronmarston","followers_url":"https://api.github.com/users/myronmarston/followers","following_url":"https://api.github.com/users/myronmarston/following{/other_user}","gists_url":"https://api.github.com/users/myronmarston/gists{/gist_id}","starred_url":"https://api.github.com/users/myronmarston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myronmarston/subscriptions","organizations_url":"https://api.github.com/users/myronmarston/orgs","repos_url":"https://api.github.com/users/myronmarston/repos","events_url":"https://api.github.com/users/myronmarston/events{/privacy}","received_events_url":"https://api.github.com/users/myronmarston/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T22:01:19Z","updated_at":"2016-12-15T22:01:19Z","body":"Thanks for reporting upstream.\r\n\r\nAgreed it's frustrating.\r\n\r\nClosing."}}
{"actor":{"display_login":"myronmarston"}}