{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-dev/issues/129","labels_url":"https://api.github.com/repos/rspec/rspec-dev/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-dev/issues/129/comments","events_url":"https://api.github.com/repos/rspec/rspec-dev/issues/129/events","html_url":"https://github.com/rspec/rspec-dev/issues/129","id":95272472,"number":129,"title":"False positives after upgrade to RSpec 3.1","user":{"login":"mcbsys","id":865498,"avatar_url":"https://avatars.githubusercontent.com/u/865498?v=3","gravatar_id":"","url":"https://api.github.com/users/mcbsys","html_url":"https://github.com/mcbsys","followers_url":"https://api.github.com/users/mcbsys/followers","following_url":"https://api.github.com/users/mcbsys/following{/other_user}","gists_url":"https://api.github.com/users/mcbsys/gists{/gist_id}","starred_url":"https://api.github.com/users/mcbsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcbsys/subscriptions","organizations_url":"https://api.github.com/users/mcbsys/orgs","repos_url":"https://api.github.com/users/mcbsys/repos","events_url":"https://api.github.com/users/mcbsys/events{/privacy}","received_events_url":"https://api.github.com/users/mcbsys/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-15T19:34:16Z","updated_at":"2015-07-15T19:48:23Z","closed_at":"2015-07-15T19:48:23Z","body":"I hope this is the right place to report this.\r\n\r\nI used Transpec 3.1.0 a few months back to convert to RSpec 2.99 and subsequently 3.1.0. The overall experience was very good but recently I have noticed that Transpec seems to have missed a few tests and unfortunately, RSpec silently passes these tests, so I only discover the issues by chance.\r\n\r\nI'm reporting the Transpec issue separately (https://github.com/yujinakayama/transpec/issues/106). Here I just want to ask if RSpec could somehow flag old / incorrect syntax rather than passing all tests in the old syntax. For example,\r\n\r\n`it { @user.notifications_pending == 0 }`\r\n`specify { new_user.notification_interval_secs == 3600 }`\r\n\r\nBoth of these test pass just fine. If I change them to \r\n\r\n`it { @user.notifications_pending == 9 }`\r\n`specify { new_user.notification_interval_secs == 600 }`\r\n\r\nthey also pass. In other words, they pass regardless of the value, so they are not testing anything. If I manually re-write them:\r\n\r\n`it { expect(@user.notifications_pending).to eq(0) }`\r\n`specify { expect(new_user.notification_interval_secs).to eq(3600) }`\r\n\r\nthey only pass when correct values are supplied.\r\n"},"comment":{"url":"https://api.github.com/repos/rspec/rspec-dev/issues/comments/121725296","html_url":"https://github.com/rspec/rspec-dev/issues/129#issuecomment-121725296","issue_url":"https://api.github.com/repos/rspec/rspec-dev/issues/129","id":121725296,"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":"2015-07-15T19:48:23Z","updated_at":"2015-07-15T19:48:23Z","body":"``` ruby\r\nit { @user.notifications_pending == 0 }\r\n```\r\n\r\nThis was never asserting anything other than the fact that calling `==` does not raise an error.  On 2.x and 3.x it behaves exactly the same, and transpec should not update it.  The old syntax (which I think you meant to use?) was:\r\n\r\n``` ruby\r\nit { @user.notifications_pending.should == 0 }\r\n```\r\n\r\nAnd if you had that in 2.x, when you use transpec to upgrade to 3.x it would correctly upgrade the syntax.\r\n\r\nWe have a feature on our roadmap (rspec/rspec-core#759) that would help in this situation by warning or erroring when you do not use any expectations in an example...but that really has nothing to do with the upgrade process.  It's just a new feature we may add at some point.\r\n\r\nI don't think there's anything actionable for us to do here (beyond the feature mentioned above), so I'm going to close this."}}