{"action":"created","comment":{"url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments/35213758","id":35213758,"diff_hunk":"@@ -0,0 +1,51 @@\n+# == Schema Information\n+#\n+# Table name: badges\n+#\n+#  id          :integer          not null, primary key\n+#  name        :string(255)\n+#  color       :string(255)\n+#  description :text(65535)\n+#  created_at  :datetime         not null\n+#  updated_at  :datetime         not null\n+#\n+\n+require 'rails_helper'\n+\n+RSpec.describe Badge, type: :model do\n+\n+  it \"有効なファクトリをもつこと\" do\n+    expect(FactoryGirl.create(:badge)).to be_valid\n+  end\n+\n+  it \"nameがなければ、無効な状態であること\" do\n+    badge = FactoryGirl.build(:badge, name: nil)\n+    badge.valid?\n+    expect(badge.errors[:name]).to include(\"can't be blank\")\n+  end\n+\n+  it \"nameが重複していれば、無効な状態であること\" do\n+    name = \"BADGE1\"\n+    FactoryGirl.create(:badge, name: name)\n+    badge = FactoryGirl.build(:badge, name: name)\n+    badge.valid?\n+    expect(badge.errors[:name]).to include(\"has already been taken\")\n+  end\n+\n+  it \"定義されたcolorでなければ、無効な状態であること\" do\n+    badge = FactoryGirl.build(:badge, color: \"invalid color\")\n+    badge.valid?\n+    expect(badge.errors[:color]).to include(\"is not included in the list\")\n+  end\n+\n+  it \"colorがなければ、無効な状態であること\" do","path":"spec/models/badge_spec.rb","position":41,"original_position":41,"commit_id":"eebcede46b5bc619b744cf3e6e2f6ba6b312e986","original_commit_id":"eebcede46b5bc619b744cf3e6e2f6ba6b312e986","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-22T13:48:52Z","updated_at":"2015-07-22T13:48:52Z","html_url":"https://github.com/maripiyoko/micro-sof/pull/33#discussion_r35213758","pull_request_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/comments/35213758"},"html":{"href":"https://github.com/maripiyoko/micro-sof/pull/33#discussion_r35213758"},"pull_request":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33","id":40566491,"html_url":"https://github.com/maripiyoko/micro-sof/pull/33","diff_url":"https://github.com/maripiyoko/micro-sof/pull/33.diff","patch_url":"https://github.com/maripiyoko/micro-sof/pull/33.patch","issue_url":"https://api.github.com/repos/maripiyoko/micro-sof/issues/33","number":33,"state":"open","locked":false,"title":"Fb badge","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":"","created_at":"2015-07-22T13:48:40Z","updated_at":"2015-07-22T13:48:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e200e53778d9581b00f231fc0c37bc1caa7edcca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33/commits","review_comments_url":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33/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/33/comments","statuses_url":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/eebcede46b5bc619b744cf3e6e2f6ba6b312e986","head":{"label":"maripiyoko:fb-badge","ref":"fb-badge","sha":"eebcede46b5bc619b744cf3e6e2f6ba6b312e986","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-22T13:48:40Z","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":760,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"maripiyoko:master","ref":"master","sha":"2696c05ea5e3b166882046101a677edaa66b5c77","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-22T13:48:40Z","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":760,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33"},"html":{"href":"https://github.com/maripiyoko/micro-sof/pull/33"},"issue":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/issues/33"},"comments":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/pulls/33/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/33/commits"},"statuses":{"href":"https://api.github.com/repos/maripiyoko/micro-sof/statuses/eebcede46b5bc619b744cf3e6e2f6ba6b312e986"}}}}