{"action":"created","comment":{"url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments/216537486","pull_request_review_id":154040213,"id":216537486,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjUzNzQ4Ng==","diff_hunk":"@@ -14,15 +14,65 @@ def test_it_exists\n   end\n \n   def test_it_has_attributes\n-    skip\n-    sa = SalesAnalyst.new\n-    assert_instance_of MerchantRepository, sa.mr\n-    assert_instance_of ItemRepository, sa.ir\n+    se = SalesEngine.from_csv({\n+      :items     => \"./data/items.csv\",\n+      :merchants => \"./data/merchants.csv\",\n+    })\n+    sa = se.analyst\n+    assert_instance_of MerchantRepository, se.merchants\n+    assert_instance_of ItemRepository, se.items\n   end\n \n   def test_it_calculates_average_items_per_merchant\n-    skip\n-    sa = SalesAnalyst.new\n+    se = SalesEngine.from_csv({\n+      :items     => \"./data/items.csv\",\n+      :merchants => \"./data/merchants.csv\",\n+    })\n+    sa = se.analyst\n     assert_equal 2.88, sa.average_items_per_merchant\n   end\n+\n+  def test_it_calculates_standard_deviation\n+    se = SalesEngine.from_csv({\n+      :items     => \"./data/items.csv\",\n+      :merchants => \"./data/merchants.csv\",\n+    })\n+    sa = se.analyst\n+    assert_equal 3.26, sa.average_items_per_merchant_standard_deviation\n+  end\n+\n+  def test_it_finds_merchants_with_high_item_count\n+    se = SalesEngine.from_csv({\n+      :items     => \"./data/items.csv\",\n+      :merchants => \"./data/merchants.csv\",\n+    })\n+    sa = se.analyst\n+\n+    # update expected\n+    expected = 52\n+    assert_equal expected, sa.merchants_with_high_item_count.count\n+  end\n+\n+  def test_it_finds_average_item_price_for_merchant\n+    se = SalesEngine.from_csv({\n+      :items     => \"./data/items.csv\",","path":"test/sales_analyst_test.rb","position":51,"original_position":51,"commit_id":"ddaefbe423bcd3c0acd876c71e23b65f04fbdeba","original_commit_id":"ddaefbe423bcd3c0acd876c71e23b65f04fbdeba","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Layout/IndentHash: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.<br>Style/HashSyntax: Use the new Ruby 1.9 hash syntax.<br>Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2018-09-11T03:42:23Z","updated_at":"2018-09-11T03:42:24Z","html_url":"https://github.com/mnhollandplum/black_thursday/pull/13#discussion_r216537486","pull_request_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments/216537486"},"html":{"href":"https://github.com/mnhollandplum/black_thursday/pull/13#discussion_r216537486"},"pull_request":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13","id":214503746,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTAzNzQ2","html_url":"https://github.com/mnhollandplum/black_thursday/pull/13","diff_url":"https://github.com/mnhollandplum/black_thursday/pull/13.diff","patch_url":"https://github.com/mnhollandplum/black_thursday/pull/13.patch","issue_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/13","number":13,"state":"open","locked":false,"title":"Add sa methods","user":{"login":"ryan-mcneil","id":41602677,"node_id":"MDQ6VXNlcjQxNjAyNjc3","avatar_url":"https://avatars3.githubusercontent.com/u/41602677?v=4","gravatar_id":"","url":"https://api.github.com/users/ryan-mcneil","html_url":"https://github.com/ryan-mcneil","followers_url":"https://api.github.com/users/ryan-mcneil/followers","following_url":"https://api.github.com/users/ryan-mcneil/following{/other_user}","gists_url":"https://api.github.com/users/ryan-mcneil/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-mcneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-mcneil/subscriptions","organizations_url":"https://api.github.com/users/ryan-mcneil/orgs","repos_url":"https://api.github.com/users/ryan-mcneil/repos","events_url":"https://api.github.com/users/ryan-mcneil/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-mcneil/received_events","type":"User","site_admin":false},"body":"Add all but final (golden_items) methods.  Refactoring and testing of helper methods is needed","created_at":"2018-09-11T03:42:11Z","updated_at":"2018-09-11T03:42:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24d8404c8fa96ee01a54f62bbecec4952bf397c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13/commits","review_comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13/comments","review_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/13/comments","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/ddaefbe423bcd3c0acd876c71e23b65f04fbdeba","head":{"label":"mnhollandplum:add_SA_methods","ref":"add_SA_methods","sha":"ddaefbe423bcd3c0acd876c71e23b65f04fbdeba","user":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"repo":{"id":147858309,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc4NTgzMDk=","name":"black_thursday","full_name":"mnhollandplum/black_thursday","owner":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnhollandplum/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/mnhollandplum/black_thursday","forks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/forks","keys_url":"https://api.github.com/repos/mnhollandplum/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnhollandplum/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnhollandplum/black_thursday/teams","hooks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/events","assignees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/mnhollandplum/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/tags","blobs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/mnhollandplum/black_thursday/languages","stargazers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscription","commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/mnhollandplum/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnhollandplum/black_thursday/merges","archive_url":"https://api.github.com/repos/mnhollandplum/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnhollandplum/black_thursday/downloads","issues_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/mnhollandplum/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/mnhollandplum/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnhollandplum/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/mnhollandplum/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/deployments","created_at":"2018-09-07T18:05:03Z","updated_at":"2018-09-11T00:35:05Z","pushed_at":"2018-09-11T03:42:12Z","git_url":"git://github.com/mnhollandplum/black_thursday.git","ssh_url":"git@github.com:mnhollandplum/black_thursday.git","clone_url":"https://github.com/mnhollandplum/black_thursday.git","svn_url":"https://github.com/mnhollandplum/black_thursday","homepage":null,"size":1715,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"mnhollandplum:master","ref":"master","sha":"ae3efa8a414d77333b996a82b6130f3b6cff9087","user":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"repo":{"id":147858309,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc4NTgzMDk=","name":"black_thursday","full_name":"mnhollandplum/black_thursday","owner":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnhollandplum/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/mnhollandplum/black_thursday","forks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/forks","keys_url":"https://api.github.com/repos/mnhollandplum/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnhollandplum/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnhollandplum/black_thursday/teams","hooks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/events","assignees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/mnhollandplum/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/tags","blobs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/mnhollandplum/black_thursday/languages","stargazers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscription","commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/mnhollandplum/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnhollandplum/black_thursday/merges","archive_url":"https://api.github.com/repos/mnhollandplum/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnhollandplum/black_thursday/downloads","issues_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/mnhollandplum/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/mnhollandplum/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnhollandplum/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/mnhollandplum/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/deployments","created_at":"2018-09-07T18:05:03Z","updated_at":"2018-09-11T00:35:05Z","pushed_at":"2018-09-11T03:42:12Z","git_url":"git://github.com/mnhollandplum/black_thursday.git","ssh_url":"git@github.com:mnhollandplum/black_thursday.git","clone_url":"https://github.com/mnhollandplum/black_thursday.git","svn_url":"https://github.com/mnhollandplum/black_thursday","homepage":null,"size":1715,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13"},"html":{"href":"https://github.com/mnhollandplum/black_thursday/pull/13"},"issue":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/13"},"comments":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/ddaefbe423bcd3c0acd876c71e23b65f04fbdeba"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}