{"action":"created","comment":{"url":"https://api.github.com/repos/jbender/motion-spec/pulls/comments/44148467","id":44148467,"diff_hunk":"@@ -1,5 +1,247 @@\n # -*- encoding : utf-8 -*-\n \n+describe MotionSpec::Should do\n+  def succeed\n+    proc do |block|\n+      block.should.not.raise MotionSpec::Error\n+      true\n+    end\n+  end\n+\n+  def fail\n+    proc do |block|\n+      block.should.raise MotionSpec::Error\n+      true\n+    end\n+  end\n+\n+  def equal_string(x)\n+    proc { |s| x == s.to_s }\n+  end\n+\n+  it 'has should.satisfy' do\n+    proc { should.satisfy { 1 == 1 } }.should succeed\n+    proc { should.satisfy { 1 } }.should succeed\n+\n+    proc { should.satisfy { 1 != 1 } }.should fail\n+    proc { should.satisfy { false } }.should fail\n+\n+    proc { 1.should.satisfy { |n| n % 2 == 0 } }.should fail\n+    proc { 2.should.satisfy { |n| n % 2 == 0 } }.should succeed\n+  end\n+\n+  it 'has should.equal' do\n+    proc { 'string1'.should.eq 'string1' }.should succeed\n+    proc { 'string1'.should.eq 'string2' }.should fail\n+    proc { '1'.should.eq 1 }.should fail\n+\n+    proc { 'string1'.should.equal 'string1' }.should succeed\n+    proc { 'string1'.should.equal 'string2' }.should fail\n+    proc { '1'.should.equal 1 }.should fail\n+  end\n+\n+  it 'has should.raise' do\n+    proc { proc { raise 'Error' }.should.raise }.should succeed\n+    proc { proc { raise 'Error' }.should.raise RuntimeError }.should succeed\n+    proc { proc { raise 'Error' }.should.not.raise }.should fail\n+    proc { proc { raise 'Error' }.should.not.raise(RuntimeError) }.should fail\n+\n+    proc { proc { 1 + 1 }.should.raise }.should fail\n+    proc { proc { raise 'Error' }.should.raise(Interrupt) }.should.raise\n+  end\n+\n+  it 'has should.raise with a block' do\n+    proc { should.raise { raise 'Error' } }.should succeed\n+    proc { should.raise(RuntimeError) { raise 'Error' } }.should succeed\n+    proc { should.not.raise { raise 'Error' } }.should fail\n+    proc { should.not.raise(RuntimeError) { raise 'Error' } }.should fail\n+\n+    proc { should.raise { 1 + 1 } }.should fail\n+    proc { should.raise(Interrupt) { raise 'Error' } }.should.raise\n+  end\n+\n+  it 'has a should.raise should return the exception' do\n+    ex = proc { raise 'foo!' }.should.raise\n+    ex.should.be.kind_of RuntimeError\n+    ex.message.should =~ /foo/\n+  end\n+\n+  it 'has should.be.an.instance_of' do\n+    proc { 'string'.should.be.instance_of String }.should succeed\n+    proc { 'string'.should.be.instance_of Hash }.should fail\n+\n+    proc { 'string'.should.be.an.instance_of String }.should succeed\n+    proc { 'string'.should.be.an.instance_of Hash }.should fail\n+  end\n+\n+  it 'has should.be.nil' do\n+    proc { nil.should.be.nil }.should succeed\n+    proc { nil.should.not.be.nil }.should fail\n+    proc { 'foo'.should.be.nil }.should fail\n+    proc { 'foo'.should.not.be.nil }.should succeed\n+  end\n+\n+  it 'has should.include' do\n+    proc { [1, 2, 3].should.include 2 }.should succeed\n+    proc { [1, 2, 3].should.include 4 }.should fail\n+\n+    proc { { 1 => 2, 3 => 4 }.should.include 1 }.should succeed\n+    proc { { 1 => 2, 3 => 4 }.should.include 2 }.should fail\n+  end\n+\n+  it 'has should.be.a.kind_of' do\n+    proc { Array.should.be.kind_of Module }.should succeed\n+    proc { 'string'.should.be.kind_of Object }.should succeed\n+    proc { 1.should.be.kind_of Comparable }.should succeed\n+\n+    proc { Array.should.be.a.kind_of Module }.should succeed\n+\n+    proc { 'string'.should.be.a.kind_of Class }.should fail\n+  end\n+\n+  it 'has should.match' do\n+    proc { 'string'.should.match(/strin./) }.should succeed\n+    proc { 'string'.should =~ /strin./ }.should succeed\n+\n+    proc { 'string'.should.match(/slin./) }.should fail\n+    proc { 'string'.should =~ /slin./ }.should fail\n+  end\n+\n+  it 'has should.not.raise' do\n+    proc { proc { 1 + 1 }.should.not.raise }.should succeed\n+    proc { proc { 1 + 1 }.should.not.raise(Interrupt) }.should succeed\n+\n+    proc {\n+      proc {\n+        proc {\n+          Kernel.raise ZeroDivisionError.new('ArgumentError')\n+        }.should.not.raise(RuntimeError, Comparable)\n+      }.should.raise ZeroDivisionError\n+    }.should succeed\n+\n+    proc { proc { raise 'Error' }.should.not.raise }.should fail\n+  end\n+\n+  it 'has should.throw' do\n+    proc { proc { throw :foo }.should.throw(:foo) }.should succeed\n+    proc { proc {       :foo }.should.throw(:foo) }.should fail\n+\n+    should.throw(:foo) { throw :foo }\n+  end\n+\n+  it 'has should.not.satisfy' do\n+    proc { should.not.satisfy { 1 == 2 } }.should succeed\n+    proc { should.not.satisfy { 1 == 1 } }.should fail","path":"spec/motion-spec/should_spec.rb","position":134,"original_position":134,"commit_id":"cf9e8b824e093c683bbce9ff600698f5ffd4793d","original_commit_id":"cf9e8b824e093c683bbce9ff600698f5ffd4793d","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Comparison of something with itself detected.","created_at":"2015-11-06T15:30:52Z","updated_at":"2015-11-06T15:30:52Z","html_url":"https://github.com/jbender/motion-spec/pull/6#discussion_r44148467","pull_request_url":"https://api.github.com/repos/jbender/motion-spec/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/comments/44148467"},"html":{"href":"https://github.com/jbender/motion-spec/pull/6#discussion_r44148467"},"pull_request":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/jbender/motion-spec/pulls/6","id":49966686,"html_url":"https://github.com/jbender/motion-spec/pull/6","diff_url":"https://github.com/jbender/motion-spec/pull/6.diff","patch_url":"https://github.com/jbender/motion-spec/pull/6.patch","issue_url":"https://api.github.com/repos/jbender/motion-spec/issues/6","number":6,"state":"open","locked":false,"title":"Allow anonymous `it` examples","user":{"login":"jbender","id":723784,"avatar_url":"https://avatars.githubusercontent.com/u/723784?v=3","gravatar_id":"","url":"https://api.github.com/users/jbender","html_url":"https://github.com/jbender","followers_url":"https://api.github.com/users/jbender/followers","following_url":"https://api.github.com/users/jbender/following{/other_user}","gists_url":"https://api.github.com/users/jbender/gists{/gist_id}","starred_url":"https://api.github.com/users/jbender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbender/subscriptions","organizations_url":"https://api.github.com/users/jbender/orgs","repos_url":"https://api.github.com/users/jbender/repos","events_url":"https://api.github.com/users/jbender/events{/privacy}","received_events_url":"https://api.github.com/users/jbender/received_events","type":"User","site_admin":false},"body":"Slowly making our way over to allowing inferred descriptions","created_at":"2015-11-06T15:30:45Z","updated_at":"2015-11-06T15:30:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89c00975eac3274fddbbdb2ba8bdb260a688a68d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jbender/motion-spec/pulls/6/commits","review_comments_url":"https://api.github.com/repos/jbender/motion-spec/pulls/6/comments","review_comment_url":"https://api.github.com/repos/jbender/motion-spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jbender/motion-spec/issues/6/comments","statuses_url":"https://api.github.com/repos/jbender/motion-spec/statuses/cf9e8b824e093c683bbce9ff600698f5ffd4793d","head":{"label":"jbender:feature/anonymous-examples","ref":"feature/anonymous-examples","sha":"cf9e8b824e093c683bbce9ff600698f5ffd4793d","user":{"login":"jbender","id":723784,"avatar_url":"https://avatars.githubusercontent.com/u/723784?v=3","gravatar_id":"","url":"https://api.github.com/users/jbender","html_url":"https://github.com/jbender","followers_url":"https://api.github.com/users/jbender/followers","following_url":"https://api.github.com/users/jbender/following{/other_user}","gists_url":"https://api.github.com/users/jbender/gists{/gist_id}","starred_url":"https://api.github.com/users/jbender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbender/subscriptions","organizations_url":"https://api.github.com/users/jbender/orgs","repos_url":"https://api.github.com/users/jbender/repos","events_url":"https://api.github.com/users/jbender/events{/privacy}","received_events_url":"https://api.github.com/users/jbender/received_events","type":"User","site_admin":false},"repo":{"id":45269421,"name":"motion-spec","full_name":"jbender/motion-spec","owner":{"login":"jbender","id":723784,"avatar_url":"https://avatars.githubusercontent.com/u/723784?v=3","gravatar_id":"","url":"https://api.github.com/users/jbender","html_url":"https://github.com/jbender","followers_url":"https://api.github.com/users/jbender/followers","following_url":"https://api.github.com/users/jbender/following{/other_user}","gists_url":"https://api.github.com/users/jbender/gists{/gist_id}","starred_url":"https://api.github.com/users/jbender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbender/subscriptions","organizations_url":"https://api.github.com/users/jbender/orgs","repos_url":"https://api.github.com/users/jbender/repos","events_url":"https://api.github.com/users/jbender/events{/privacy}","received_events_url":"https://api.github.com/users/jbender/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbender/motion-spec","description":"RubyMotion spec library","fork":false,"url":"https://api.github.com/repos/jbender/motion-spec","forks_url":"https://api.github.com/repos/jbender/motion-spec/forks","keys_url":"https://api.github.com/repos/jbender/motion-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbender/motion-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbender/motion-spec/teams","hooks_url":"https://api.github.com/repos/jbender/motion-spec/hooks","issue_events_url":"https://api.github.com/repos/jbender/motion-spec/issues/events{/number}","events_url":"https://api.github.com/repos/jbender/motion-spec/events","assignees_url":"https://api.github.com/repos/jbender/motion-spec/assignees{/user}","branches_url":"https://api.github.com/repos/jbender/motion-spec/branches{/branch}","tags_url":"https://api.github.com/repos/jbender/motion-spec/tags","blobs_url":"https://api.github.com/repos/jbender/motion-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbender/motion-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbender/motion-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbender/motion-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbender/motion-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/jbender/motion-spec/languages","stargazers_url":"https://api.github.com/repos/jbender/motion-spec/stargazers","contributors_url":"https://api.github.com/repos/jbender/motion-spec/contributors","subscribers_url":"https://api.github.com/repos/jbender/motion-spec/subscribers","subscription_url":"https://api.github.com/repos/jbender/motion-spec/subscription","commits_url":"https://api.github.com/repos/jbender/motion-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbender/motion-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbender/motion-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbender/motion-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbender/motion-spec/contents/{+path}","compare_url":"https://api.github.com/repos/jbender/motion-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbender/motion-spec/merges","archive_url":"https://api.github.com/repos/jbender/motion-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbender/motion-spec/downloads","issues_url":"https://api.github.com/repos/jbender/motion-spec/issues{/number}","pulls_url":"https://api.github.com/repos/jbender/motion-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/jbender/motion-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/jbender/motion-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbender/motion-spec/labels{/name}","releases_url":"https://api.github.com/repos/jbender/motion-spec/releases{/id}","created_at":"2015-10-30T18:32:59Z","updated_at":"2015-10-30T22:51:25Z","pushed_at":"2015-11-06T15:30:46Z","git_url":"git://github.com/jbender/motion-spec.git","ssh_url":"git@github.com:jbender/motion-spec.git","clone_url":"https://github.com/jbender/motion-spec.git","svn_url":"https://github.com/jbender/motion-spec","homepage":"","size":360,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"jbender:master","ref":"master","sha":"524fc5cbce8e936accd462a537fb1c99b8bccf4f","user":{"login":"jbender","id":723784,"avatar_url":"https://avatars.githubusercontent.com/u/723784?v=3","gravatar_id":"","url":"https://api.github.com/users/jbender","html_url":"https://github.com/jbender","followers_url":"https://api.github.com/users/jbender/followers","following_url":"https://api.github.com/users/jbender/following{/other_user}","gists_url":"https://api.github.com/users/jbender/gists{/gist_id}","starred_url":"https://api.github.com/users/jbender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbender/subscriptions","organizations_url":"https://api.github.com/users/jbender/orgs","repos_url":"https://api.github.com/users/jbender/repos","events_url":"https://api.github.com/users/jbender/events{/privacy}","received_events_url":"https://api.github.com/users/jbender/received_events","type":"User","site_admin":false},"repo":{"id":45269421,"name":"motion-spec","full_name":"jbender/motion-spec","owner":{"login":"jbender","id":723784,"avatar_url":"https://avatars.githubusercontent.com/u/723784?v=3","gravatar_id":"","url":"https://api.github.com/users/jbender","html_url":"https://github.com/jbender","followers_url":"https://api.github.com/users/jbender/followers","following_url":"https://api.github.com/users/jbender/following{/other_user}","gists_url":"https://api.github.com/users/jbender/gists{/gist_id}","starred_url":"https://api.github.com/users/jbender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbender/subscriptions","organizations_url":"https://api.github.com/users/jbender/orgs","repos_url":"https://api.github.com/users/jbender/repos","events_url":"https://api.github.com/users/jbender/events{/privacy}","received_events_url":"https://api.github.com/users/jbender/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbender/motion-spec","description":"RubyMotion spec library","fork":false,"url":"https://api.github.com/repos/jbender/motion-spec","forks_url":"https://api.github.com/repos/jbender/motion-spec/forks","keys_url":"https://api.github.com/repos/jbender/motion-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbender/motion-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbender/motion-spec/teams","hooks_url":"https://api.github.com/repos/jbender/motion-spec/hooks","issue_events_url":"https://api.github.com/repos/jbender/motion-spec/issues/events{/number}","events_url":"https://api.github.com/repos/jbender/motion-spec/events","assignees_url":"https://api.github.com/repos/jbender/motion-spec/assignees{/user}","branches_url":"https://api.github.com/repos/jbender/motion-spec/branches{/branch}","tags_url":"https://api.github.com/repos/jbender/motion-spec/tags","blobs_url":"https://api.github.com/repos/jbender/motion-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbender/motion-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbender/motion-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbender/motion-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbender/motion-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/jbender/motion-spec/languages","stargazers_url":"https://api.github.com/repos/jbender/motion-spec/stargazers","contributors_url":"https://api.github.com/repos/jbender/motion-spec/contributors","subscribers_url":"https://api.github.com/repos/jbender/motion-spec/subscribers","subscription_url":"https://api.github.com/repos/jbender/motion-spec/subscription","commits_url":"https://api.github.com/repos/jbender/motion-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbender/motion-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbender/motion-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbender/motion-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbender/motion-spec/contents/{+path}","compare_url":"https://api.github.com/repos/jbender/motion-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbender/motion-spec/merges","archive_url":"https://api.github.com/repos/jbender/motion-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbender/motion-spec/downloads","issues_url":"https://api.github.com/repos/jbender/motion-spec/issues{/number}","pulls_url":"https://api.github.com/repos/jbender/motion-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/jbender/motion-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/jbender/motion-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbender/motion-spec/labels{/name}","releases_url":"https://api.github.com/repos/jbender/motion-spec/releases{/id}","created_at":"2015-10-30T18:32:59Z","updated_at":"2015-10-30T22:51:25Z","pushed_at":"2015-11-06T15:30:46Z","git_url":"git://github.com/jbender/motion-spec.git","ssh_url":"git@github.com:jbender/motion-spec.git","clone_url":"https://github.com/jbender/motion-spec.git","svn_url":"https://github.com/jbender/motion-spec","homepage":"","size":360,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/6"},"html":{"href":"https://github.com/jbender/motion-spec/pull/6"},"issue":{"href":"https://api.github.com/repos/jbender/motion-spec/issues/6"},"comments":{"href":"https://api.github.com/repos/jbender/motion-spec/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jbender/motion-spec/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/jbender/motion-spec/statuses/cf9e8b824e093c683bbce9ff600698f5ffd4793d"}}}}