GitHub PullRequestReviewCommentEvent at 2014-04-03 08:08:12
Repository: rspec-expectations
Actor: yelled3
Payload: {"comment":{"url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments/11242137","id":11242137,"diff_hunk":"@@ -29,12 +31,39 @@ def and(matcher)\n       #\n       # @example\n       #   expect(stoplight.color).to eq(\"red\").or eq(\"green\").or eq(\"yellow\")\n+      #   expect(stoplight.color).to eq(\"red\") | eq(\"green\") | eq(\"yellow\")\n       #\n       # @note The negative form (`expect(...).not_to matcher.or other`)\n       #   is not supported at this time.\n       def or(matcher)\n         BuiltIn::Compound::Or.new self, matcher\n       end\n+      alias | or\n+\n+      # Negates a matcher.\n+      #\n+      # @example\n+      #   expect(stoplight.colors).to ~include(:blue)\n+      #   expect(3..15).to ~cover(20)\n+      #   expect(7.1).to ~(be_within(0.5).of(8.0))\n+      #\n+      # On an individual matcher (as shown above) this is equivalent to using\n+      # `expect(...).not_to`, and isn't particularly useful.\n+      # Where it becomes quite useful is when using it in compound matcher expressions.\n+      # It saves you from having to define a custom matcher for the negated form.\n+      #\n+      # @example\n+      #   expect(stoplight.colors).to include(:red).and ~include(:blue)\n+      #   expect(3..15).to cover(12).and ~cover(20)\n+      #   expect(7.1).to be_within(0.1).of(7.0).and ~(be_within(0.5).of(8.0))","path":"lib/rspec/matchers/composable.rb","position":43,"original_position":43,"commit_id":"bde5b55d90cd0d66f703b7caa91c49608f741910","original_commit_id":"bde5b55d90cd0d66f703b7caa91c49608f741910","user":{"login":"yelled3","id":818124,"avatar_url":"https://avatars.githubusercontent.com/u/818124?","gravatar_id":"faa2eb4cbc87cd14cb2ee9a39c31d9d1","url":"https://api.github.com/users/yelled3","html_url":"https://github.com/yelled3","followers_url":"https://api.github.com/users/yelled3/followers","following_url":"https://api.github.com/users/yelled3/following{/other_user}","gists_url":"https://api.github.com/users/yelled3/gists{/gist_id}","starred_url":"https://api.github.com/users/yelled3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yelled3/subscriptions","organizations_url":"https://api.github.com/users/yelled3/orgs","repos_url":"https://api.github.com/users/yelled3/repos","events_url":"https://api.github.com/users/yelled3/events{/privacy}","received_events_url":"https://api.github.com/users/yelled3/received_events","type":"User","site_admin":false},"body":"correct again :-)","created_at":"2014-04-03T08:08:12Z","updated_at":"2014-04-03T08:08:12Z","html_url":"https://github.com/rspec/rspec-expectations/pull/505#discussion_r11242137","pull_request_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/505","_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments/11242137"},"html":{"href":"https://github.com/rspec/rspec-expectations/pull/505#discussion_r11242137"},"pull_request":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/505"}}}}