{"action":"created","comment":{"url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments/34257825","id":34257825,"diff_hunk":"@@ -0,0 +1,77 @@\n+# == Schema Information\n+#\n+# Table name: votes\n+#\n+#  id           :integer          not null, primary key\n+#  user_id      :integer\n+#  votable_id   :integer\n+#  votable_type :string(255)\n+#  created_at   :datetime         not null\n+#  updated_at   :datetime         not null\n+#  score        :integer          default(0)\n+#\n+\n+require 'rails_helper'\n+\n+RSpec.describe Vote, type: :model do\n+\n+  let(:user) { FactoryGirl.create(:user) }\n+  let(:question) { FactoryGirl.create(:question, user: user) }\n+  let(:answer) { FactoryGirl.create(:answer, user: user) }\n+\n+  it \"User IDとQuestion IDがあれば、有効な状態であること\" do\n+    vote = Vote.new\n+    vote.user = user\n+    vote.votable = question\n+    expect(vote).to be_valid\n+  end\n+\n+  it \"User IDとAnswer IDがあれば、有効な状態であること\" do","path":"spec/models/vote_spec.rb","position":29,"original_position":29,"commit_id":"1da18bffb8618d77c6590d997fe25669979e645e","original_commit_id":"1da18bffb8618d77c6590d997fe25669979e645e","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":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2015-07-09T14:03:17Z","updated_at":"2015-07-09T14:03:17Z","html_url":"https://github.com/maripiyoko/micro-sof/pull/12#discussion_r34257825","pull_request_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments/34257825"},"html":{"href":"https://github.com/maripiyoko/micro-sof/pull/12#discussion_r34257825"},"pull_request":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12","id":39586181,"html_url":"https://github.com/maripiyoko/micro-sof/pull/12","diff_url":"https://github.com/maripiyoko/micro-sof/pull/12.diff","patch_url":"https://github.com/maripiyoko/micro-sof/pull/12.patch","issue_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/12","number":12,"state":"open","locked":false,"title":"Vote","user":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"body":"#11 ","created_at":"2015-07-09T14:03:02Z","updated_at":"2015-07-09T14:03:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5e4fd3edf69f4b33a4550f3eb86e47ccfbb54d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12/commits","review_comments_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12/comments","review_comment_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/12/comments","statuses_url":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/1da18bffb8618d77c6590d997fe25669979e645e","head":{"label":"maripiyoko:vote","ref":"vote","sha":"1da18bffb8618d77c6590d997fe25669979e645e","user":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"repo":{"id":38473297,"name":"micro-sof","full_name":"maripiyoko/micro-sof","owner":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maripiyoko/micro-sof","description":"Rails practice app.","fork":false,"url":"https://api.github.com/repos/maripiyoko/micro-sof","forks_url":"https://api.github.com/repos/maripiyoko/micro-sof/forks","keys_url":"https://api.github.com/repos/maripiyoko/micro-sof/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maripiyoko/micro-sof/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maripiyoko/micro-sof/teams","hooks_url":"https://api.github.com/repos/maripiyoko/micro-sof/hooks","issue_events_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/events{/number}","events_url":"https://api.github.com/repos/maripiyoko/micro-sof/events","assignees_url":"https://api.github.com/repos/maripiyoko/micro-sof/assignees{/user}","branches_url":"https://api.github.com/repos/maripiyoko/micro-sof/branches{/branch}","tags_url":"https://api.github.com/repos/maripiyoko/micro-sof/tags","blobs_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/refs{/sha}","trees_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/{sha}","languages_url":"https://api.github.com/repos/maripiyoko/micro-sof/languages","stargazers_url":"https://api.github.com/repos/maripiyoko/micro-sof/stargazers","contributors_url":"https://api.github.com/repos/maripiyoko/micro-sof/contributors","subscribers_url":"https://api.github.com/repos/maripiyoko/micro-sof/subscribers","subscription_url":"https://api.github.com/repos/maripiyoko/micro-sof/subscription","commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/commits{/sha}","git_commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/commits{/sha}","comments_url":"https://api.github.com/repos/maripiyoko/micro-sof/comments{/number}","issue_comment_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/comments{/number}","contents_url":"https://api.github.com/repos/maripiyoko/micro-sof/contents/{+path}","compare_url":"https://api.github.com/repos/maripiyoko/micro-sof/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maripiyoko/micro-sof/merges","archive_url":"https://api.github.com/repos/maripiyoko/micro-sof/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maripiyoko/micro-sof/downloads","issues_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues{/number}","pulls_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls{/number}","milestones_url":"https://api.github.com/repos/maripiyoko/micro-sof/milestones{/number}","notifications_url":"https://api.github.com/repos/maripiyoko/micro-sof/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maripiyoko/micro-sof/labels{/name}","releases_url":"https://api.github.com/repos/maripiyoko/micro-sof/releases{/id}","created_at":"2015-07-03T05:14:42Z","updated_at":"2015-07-03T08:04:25Z","pushed_at":"2015-07-09T14:03:02Z","git_url":"git://github.com/maripiyoko/micro-sof.git","ssh_url":"git@github.com:maripiyoko/micro-sof.git","clone_url":"https://github.com/maripiyoko/micro-sof.git","svn_url":"https://github.com/maripiyoko/micro-sof","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"maripiyoko:master","ref":"master","sha":"44ff58275360354a283f5c2cbd7f77524154537e","user":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"repo":{"id":38473297,"name":"micro-sof","full_name":"maripiyoko/micro-sof","owner":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maripiyoko/micro-sof","description":"Rails practice app.","fork":false,"url":"https://api.github.com/repos/maripiyoko/micro-sof","forks_url":"https://api.github.com/repos/maripiyoko/micro-sof/forks","keys_url":"https://api.github.com/repos/maripiyoko/micro-sof/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maripiyoko/micro-sof/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maripiyoko/micro-sof/teams","hooks_url":"https://api.github.com/repos/maripiyoko/micro-sof/hooks","issue_events_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/events{/number}","events_url":"https://api.github.com/repos/maripiyoko/micro-sof/events","assignees_url":"https://api.github.com/repos/maripiyoko/micro-sof/assignees{/user}","branches_url":"https://api.github.com/repos/maripiyoko/micro-sof/branches{/branch}","tags_url":"https://api.github.com/repos/maripiyoko/micro-sof/tags","blobs_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/refs{/sha}","trees_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/{sha}","languages_url":"https://api.github.com/repos/maripiyoko/micro-sof/languages","stargazers_url":"https://api.github.com/repos/maripiyoko/micro-sof/stargazers","contributors_url":"https://api.github.com/repos/maripiyoko/micro-sof/contributors","subscribers_url":"https://api.github.com/repos/maripiyoko/micro-sof/subscribers","subscription_url":"https://api.github.com/repos/maripiyoko/micro-sof/subscription","commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/commits{/sha}","git_commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/git/commits{/sha}","comments_url":"https://api.github.com/repos/maripiyoko/micro-sof/comments{/number}","issue_comment_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/comments{/number}","contents_url":"https://api.github.com/repos/maripiyoko/micro-sof/contents/{+path}","compare_url":"https://api.github.com/repos/maripiyoko/micro-sof/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maripiyoko/micro-sof/merges","archive_url":"https://api.github.com/repos/maripiyoko/micro-sof/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maripiyoko/micro-sof/downloads","issues_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues{/number}","pulls_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls{/number}","milestones_url":"https://api.github.com/repos/maripiyoko/micro-sof/milestones{/number}","notifications_url":"https://api.github.com/repos/maripiyoko/micro-sof/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maripiyoko/micro-sof/labels{/name}","releases_url":"https://api.github.com/repos/maripiyoko/micro-sof/releases{/id}","created_at":"2015-07-03T05:14:42Z","updated_at":"2015-07-03T08:04:25Z","pushed_at":"2015-07-09T14:03:02Z","git_url":"git://github.com/maripiyoko/micro-sof.git","ssh_url":"git@github.com:maripiyoko/micro-sof.git","clone_url":"https://github.com/maripiyoko/micro-sof.git","svn_url":"https://github.com/maripiyoko/micro-sof","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12"},"html":{"href":"https://github.com/maripiyoko/micro-sof/pull/12"},"issue":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/issues/12"},"comments":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/1da18bffb8618d77c6590d997fe25669979e645e"}}}}