{"action":"created","comment":{"url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/comments/63187178","id":63187178,"diff_hunk":"@@ -44,4 +44,62 @@\n     end\n \n   end\n+\n+  describe \"populate_game method works as intended\" do\n+\n+    it \"should create 32 pieces\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.reload.pieces.count).to eq 32\n+    end\n+\n+    it \"should create 16 white pieces\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(color: \"white\").count).to eq 16\n+    end\n+\n+    it \"should create 16 black pieces\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(color: \"black\").count).to eq 16\n+    end\n+\n+    it \"should create 16 Pawns\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"Pawn\").count).to eq 16\n+    end\n+\n+    it \"should create 4 Rooks\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"Rook\").count).to eq 4\n+    end\n+\n+    it \"should create 4 Knights\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"Knight\").count).to eq 4\n+    end\n+\n+    it \"should create 4 Bishops\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"Bishop\").count).to eq 4\n+    end\n+\n+    it \"should create 2 Queens\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"Queen\").count).to eq 2\n+    end\n+\n+    it \"should create 2 Kings\" do\n+      game = FactoryGirl.build(:game)\n+      game.populate_game\n+      expect(game.pieces.where(type: \"King\").count).to eq 2\n+    end\n+","path":"spec/models/game_spec.rb","position":60,"original_position":60,"commit_id":"dbc5a2e9bf87933ac616f6d2023bbb309f55ab99","original_commit_id":"dbc5a2e9bf87933ac616f6d2023bbb309f55ab99","user":{"login":"taylorn16","id":17124546,"avatar_url":"https://avatars.githubusercontent.com/u/17124546?v=3","gravatar_id":"","url":"https://api.github.com/users/taylorn16","html_url":"https://github.com/taylorn16","followers_url":"https://api.github.com/users/taylorn16/followers","following_url":"https://api.github.com/users/taylorn16/following{/other_user}","gists_url":"https://api.github.com/users/taylorn16/gists{/gist_id}","starred_url":"https://api.github.com/users/taylorn16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taylorn16/subscriptions","organizations_url":"https://api.github.com/users/taylorn16/orgs","repos_url":"https://api.github.com/users/taylorn16/repos","events_url":"https://api.github.com/users/taylorn16/events{/privacy}","received_events_url":"https://api.github.com/users/taylorn16/received_events","type":"User","site_admin":false},"body":"We should also test that at least most of the pieces are in the correct spot. The number is important, but the location is as well!","created_at":"2016-05-13T14:00:45Z","updated_at":"2016-05-13T14:00:45Z","html_url":"https://github.com/kaorus-army/chess_with_friends/pull/15#discussion_r63187178","pull_request_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/comments/63187178"},"html":{"href":"https://github.com/kaorus-army/chess_with_friends/pull/15#discussion_r63187178"},"pull_request":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15","id":69930874,"html_url":"https://github.com/kaorus-army/chess_with_friends/pull/15","diff_url":"https://github.com/kaorus-army/chess_with_friends/pull/15.diff","patch_url":"https://github.com/kaorus-army/chess_with_friends/pull/15.patch","issue_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/15","number":15,"state":"open","locked":false,"title":"Create and test Populate Game","user":{"login":"janellias","id":17131973,"avatar_url":"https://avatars.githubusercontent.com/u/17131973?v=3","gravatar_id":"","url":"https://api.github.com/users/janellias","html_url":"https://github.com/janellias","followers_url":"https://api.github.com/users/janellias/followers","following_url":"https://api.github.com/users/janellias/following{/other_user}","gists_url":"https://api.github.com/users/janellias/gists{/gist_id}","starred_url":"https://api.github.com/users/janellias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janellias/subscriptions","organizations_url":"https://api.github.com/users/janellias/orgs","repos_url":"https://api.github.com/users/janellias/repos","events_url":"https://api.github.com/users/janellias/events{/privacy}","received_events_url":"https://api.github.com/users/janellias/received_events","type":"User","site_admin":false},"body":"*Added populate_game method & tests","created_at":"2016-05-13T01:20:40Z","updated_at":"2016-05-13T14:00:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15/commits","review_comments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15/comments","review_comment_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/15/comments","statuses_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/statuses/dbc5a2e9bf87933ac616f6d2023bbb309f55ab99","head":{"label":"kaorus-army:populate-game","ref":"populate-game","sha":"dbc5a2e9bf87933ac616f6d2023bbb309f55ab99","user":{"login":"kaorus-army","id":18682019,"avatar_url":"https://avatars.githubusercontent.com/u/18682019?v=3","gravatar_id":"","url":"https://api.github.com/users/kaorus-army","html_url":"https://github.com/kaorus-army","followers_url":"https://api.github.com/users/kaorus-army/followers","following_url":"https://api.github.com/users/kaorus-army/following{/other_user}","gists_url":"https://api.github.com/users/kaorus-army/gists{/gist_id}","starred_url":"https://api.github.com/users/kaorus-army/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaorus-army/subscriptions","organizations_url":"https://api.github.com/users/kaorus-army/orgs","repos_url":"https://api.github.com/users/kaorus-army/repos","events_url":"https://api.github.com/users/kaorus-army/events{/privacy}","received_events_url":"https://api.github.com/users/kaorus-army/received_events","type":"Organization","site_admin":false},"repo":{"id":57135133,"name":"chess_with_friends","full_name":"kaorus-army/chess_with_friends","owner":{"login":"kaorus-army","id":18682019,"avatar_url":"https://avatars.githubusercontent.com/u/18682019?v=3","gravatar_id":"","url":"https://api.github.com/users/kaorus-army","html_url":"https://github.com/kaorus-army","followers_url":"https://api.github.com/users/kaorus-army/followers","following_url":"https://api.github.com/users/kaorus-army/following{/other_user}","gists_url":"https://api.github.com/users/kaorus-army/gists{/gist_id}","starred_url":"https://api.github.com/users/kaorus-army/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaorus-army/subscriptions","organizations_url":"https://api.github.com/users/kaorus-army/orgs","repos_url":"https://api.github.com/users/kaorus-army/repos","events_url":"https://api.github.com/users/kaorus-army/events{/privacy}","received_events_url":"https://api.github.com/users/kaorus-army/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaorus-army/chess_with_friends","description":"Firehose chess app for group project. Rails 4.2.6 and Ruby 2.3.0.","fork":false,"url":"https://api.github.com/repos/kaorus-army/chess_with_friends","forks_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/forks","keys_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/teams","hooks_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/hooks","issue_events_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/events{/number}","events_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/events","assignees_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/assignees{/user}","branches_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/branches{/branch}","tags_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/tags","blobs_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/statuses/{sha}","languages_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/languages","stargazers_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/stargazers","contributors_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/contributors","subscribers_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/subscribers","subscription_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/subscription","commits_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/contents/{+path}","compare_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/merges","archive_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/downloads","issues_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues{/number}","pulls_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls{/number}","milestones_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/milestones{/number}","notifications_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/labels{/name}","releases_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/releases{/id}","deployments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/deployments","created_at":"2016-04-26T14:30:15Z","updated_at":"2016-05-12T16:26:52Z","pushed_at":"2016-05-13T01:20:40Z","git_url":"git://github.com/kaorus-army/chess_with_friends.git","ssh_url":"git@github.com:kaorus-army/chess_with_friends.git","clone_url":"https://github.com/kaorus-army/chess_with_friends.git","svn_url":"https://github.com/kaorus-army/chess_with_friends","homepage":"","size":98,"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":"kaorus-army:master","ref":"master","sha":"9dab9f9abb30bef669c299dd4363b131b7fab260","user":{"login":"kaorus-army","id":18682019,"avatar_url":"https://avatars.githubusercontent.com/u/18682019?v=3","gravatar_id":"","url":"https://api.github.com/users/kaorus-army","html_url":"https://github.com/kaorus-army","followers_url":"https://api.github.com/users/kaorus-army/followers","following_url":"https://api.github.com/users/kaorus-army/following{/other_user}","gists_url":"https://api.github.com/users/kaorus-army/gists{/gist_id}","starred_url":"https://api.github.com/users/kaorus-army/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaorus-army/subscriptions","organizations_url":"https://api.github.com/users/kaorus-army/orgs","repos_url":"https://api.github.com/users/kaorus-army/repos","events_url":"https://api.github.com/users/kaorus-army/events{/privacy}","received_events_url":"https://api.github.com/users/kaorus-army/received_events","type":"Organization","site_admin":false},"repo":{"id":57135133,"name":"chess_with_friends","full_name":"kaorus-army/chess_with_friends","owner":{"login":"kaorus-army","id":18682019,"avatar_url":"https://avatars.githubusercontent.com/u/18682019?v=3","gravatar_id":"","url":"https://api.github.com/users/kaorus-army","html_url":"https://github.com/kaorus-army","followers_url":"https://api.github.com/users/kaorus-army/followers","following_url":"https://api.github.com/users/kaorus-army/following{/other_user}","gists_url":"https://api.github.com/users/kaorus-army/gists{/gist_id}","starred_url":"https://api.github.com/users/kaorus-army/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaorus-army/subscriptions","organizations_url":"https://api.github.com/users/kaorus-army/orgs","repos_url":"https://api.github.com/users/kaorus-army/repos","events_url":"https://api.github.com/users/kaorus-army/events{/privacy}","received_events_url":"https://api.github.com/users/kaorus-army/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaorus-army/chess_with_friends","description":"Firehose chess app for group project. Rails 4.2.6 and Ruby 2.3.0.","fork":false,"url":"https://api.github.com/repos/kaorus-army/chess_with_friends","forks_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/forks","keys_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/teams","hooks_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/hooks","issue_events_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/events{/number}","events_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/events","assignees_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/assignees{/user}","branches_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/branches{/branch}","tags_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/tags","blobs_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/statuses/{sha}","languages_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/languages","stargazers_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/stargazers","contributors_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/contributors","subscribers_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/subscribers","subscription_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/subscription","commits_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/contents/{+path}","compare_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/merges","archive_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/downloads","issues_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues{/number}","pulls_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls{/number}","milestones_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/milestones{/number}","notifications_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/labels{/name}","releases_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/releases{/id}","deployments_url":"https://api.github.com/repos/kaorus-army/chess_with_friends/deployments","created_at":"2016-04-26T14:30:15Z","updated_at":"2016-05-12T16:26:52Z","pushed_at":"2016-05-13T01:20:40Z","git_url":"git://github.com/kaorus-army/chess_with_friends.git","ssh_url":"git@github.com:kaorus-army/chess_with_friends.git","clone_url":"https://github.com/kaorus-army/chess_with_friends.git","svn_url":"https://github.com/kaorus-army/chess_with_friends","homepage":"","size":98,"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/kaorus-army/chess_with_friends/pulls/15"},"html":{"href":"https://github.com/kaorus-army/chess_with_friends/pull/15"},"issue":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/15"},"comments":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/kaorus-army/chess_with_friends/statuses/dbc5a2e9bf87933ac616f6d2023bbb309f55ab99"}}}}