{"action":"created","comment":{"url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/comments/200821854","pull_request_review_id":135214045,"id":200821854,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDgyMTg1NA==","diff_hunk":"@@ -0,0 +1,83 @@\n+require 'minitest/autorun'\n+require 'minitest/pride'\n+require './lib/binary_translator'\n+\n+class BinaryTranslatorTest < Minitest::Test\n+\n+  def test_it_exists\n+    bt = BinaryTranslator.new\n+\n+    assert_instance_of BinaryTranslator, bt\n+  end\n+\n+  def test_does_it_translate_alpha_to_binary\n+    bt = BinaryTranslator.new\n+    actual_1 = bt.translate(\"a\")\n+\n+    assert_equal \"000001\", actual_1\n+\n+    actual_2 = bt.translate(\"z\")\n+\n+    assert_equal \"011010\", actual_2\n+  end\n+\n+  def test_it_can_translate_more_than_one_character\n+    bt = BinaryTranslator.new\n+    actual = bt.translate(\"turing\")\n+\n+    assert_equal \"010100010101010010001001001110000111\", actual\n+  end\n+\n+  def test_it_can_translate_a_capital_letter\n+    bt = BinaryTranslator.new\n+    actual_1 = bt.translate(\"A\")\n+    actual_2 = bt.translate(\"TURING\")\n+\n+    assert_equal \"000001\", actual_1\n+    assert_equal \"010100010101010010001001001110000111\", actual_2\n+  end\n+\n+  def test_it_can_translate_non_alpha_characters\n+    bt = BinaryTranslator.new\n+    actual_1 = bt.translate(\" \")\n+    actual_2 = bt.translate(\"!@{$#%^&*()}\")\n+    actual_3 = bt.translate(\"Hello World!\")\n+\n+    assert_equal \"000000\", actual_1\n+    assert_equal \"\", actual_2\n+    assert_equal \"001000000101001100001100001111000000010111001111010010001100000100\", actual_3\n+   end\n+\n+# tests my helper method, but it's not needed since the hash will return a nil for any\n+# character not in the keys, then the join will take care of the rest.\n+   # def test_it_leaves_only_alpha_and_spaces\n+   #   skip\n+   #     bt = BinaryTranslator.new\n+   #     actual = bt.string_prep(\"!@{$#%^&*()}\")\n+   #\n+   #     assert_equal [], actual\n+   #   end\n+\n+    def test_it_translates_from_binary_to_text\n+      bt = BinaryTranslator.new\n+      actual = bt.translate_to_text(\"001000000101001100001100001111000000010111001111010010001100000100\")\n+\n+      assert_equal \"hello world\", actual\n+    end\n+\n+    def test_it_splits_binary_into_array_of_six_digits\n+      bt = BinaryTranslator.new\n+      actual = bt.string_to_array(\"001000000101001100\")\n+      expected = [\"001000\", \"000101\", \"001100\"]\n+\n+      assert_equal expected, actual\n+    end\n+\n+    def test_it_maps_binary_strings_to_alpha\n+      bt = BinaryTranslator.new\n+      actual = bt.binary_array_to_keys([\"001000\", \"000101\", \"001100\"])\n+\n+      assert_equal \"hel\", actual\n+    end","path":"test/binary_translator_test.rb","position":81,"original_position":81,"commit_id":"c063833f7daf2fd6d40eb4f706278f5ac518ce3f","original_commit_id":"c063833f7daf2fd6d40eb4f706278f5ac518ce3f","user":{"login":"BrianZanti","id":8962411,"node_id":"MDQ6VXNlcjg5NjI0MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8962411?v=4","gravatar_id":"","url":"https://api.github.com/users/BrianZanti","html_url":"https://github.com/BrianZanti","followers_url":"https://api.github.com/users/BrianZanti/followers","following_url":"https://api.github.com/users/BrianZanti/following{/other_user}","gists_url":"https://api.github.com/users/BrianZanti/gists{/gist_id}","starred_url":"https://api.github.com/users/BrianZanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrianZanti/subscriptions","organizations_url":"https://api.github.com/users/BrianZanti/orgs","repos_url":"https://api.github.com/users/BrianZanti/repos","events_url":"https://api.github.com/users/BrianZanti/events{/privacy}","received_events_url":"https://api.github.com/users/BrianZanti/received_events","type":"User","site_admin":false},"body":"Great job testing your helper methods!","created_at":"2018-07-07T20:50:10Z","updated_at":"2018-07-07T20:50:11Z","html_url":"https://github.com/turingschool-examples/binary_translator/pull/16#discussion_r200821854","pull_request_url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/comments/200821854"},"html":{"href":"https://github.com/turingschool-examples/binary_translator/pull/16#discussion_r200821854"},"pull_request":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16","id":199584762,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NTg0NzYy","html_url":"https://github.com/turingschool-examples/binary_translator/pull/16","diff_url":"https://github.com/turingschool-examples/binary_translator/pull/16.diff","patch_url":"https://github.com/turingschool-examples/binary_translator/pull/16.patch","issue_url":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/16","number":16,"state":"closed","locked":false,"title":"Kat Yruegas ","user":{"login":"KatECN11","id":37309438,"node_id":"MDQ6VXNlcjM3MzA5NDM4","avatar_url":"https://avatars3.githubusercontent.com/u/37309438?v=4","gravatar_id":"","url":"https://api.github.com/users/KatECN11","html_url":"https://github.com/KatECN11","followers_url":"https://api.github.com/users/KatECN11/followers","following_url":"https://api.github.com/users/KatECN11/following{/other_user}","gists_url":"https://api.github.com/users/KatECN11/gists{/gist_id}","starred_url":"https://api.github.com/users/KatECN11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatECN11/subscriptions","organizations_url":"https://api.github.com/users/KatECN11/orgs","repos_url":"https://api.github.com/users/KatECN11/repos","events_url":"https://api.github.com/users/KatECN11/events{/privacy}","received_events_url":"https://api.github.com/users/KatECN11/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-05T20:54:16Z","updated_at":"2018-07-07T20:50:11Z","closed_at":"2018-07-07T20:33:12Z","merged_at":null,"merge_commit_sha":"91fa69b7e7c48fd41f366728fbcafaf635bc6b12","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16/commits","review_comments_url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16/comments","review_comment_url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/16/comments","statuses_url":"https://api.github.com/repos/turingschool-examples/binary_translator/statuses/c063833f7daf2fd6d40eb4f706278f5ac518ce3f","head":{"label":"KatECN11:master","ref":"master","sha":"c063833f7daf2fd6d40eb4f706278f5ac518ce3f","user":{"login":"KatECN11","id":37309438,"node_id":"MDQ6VXNlcjM3MzA5NDM4","avatar_url":"https://avatars3.githubusercontent.com/u/37309438?v=4","gravatar_id":"","url":"https://api.github.com/users/KatECN11","html_url":"https://github.com/KatECN11","followers_url":"https://api.github.com/users/KatECN11/followers","following_url":"https://api.github.com/users/KatECN11/following{/other_user}","gists_url":"https://api.github.com/users/KatECN11/gists{/gist_id}","starred_url":"https://api.github.com/users/KatECN11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatECN11/subscriptions","organizations_url":"https://api.github.com/users/KatECN11/orgs","repos_url":"https://api.github.com/users/KatECN11/repos","events_url":"https://api.github.com/users/KatECN11/events{/privacy}","received_events_url":"https://api.github.com/users/KatECN11/received_events","type":"User","site_admin":false},"repo":{"id":139889562,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4ODk1NjI=","name":"binary_translator","full_name":"KatECN11/binary_translator","owner":{"login":"KatECN11","id":37309438,"node_id":"MDQ6VXNlcjM3MzA5NDM4","avatar_url":"https://avatars3.githubusercontent.com/u/37309438?v=4","gravatar_id":"","url":"https://api.github.com/users/KatECN11","html_url":"https://github.com/KatECN11","followers_url":"https://api.github.com/users/KatECN11/followers","following_url":"https://api.github.com/users/KatECN11/following{/other_user}","gists_url":"https://api.github.com/users/KatECN11/gists{/gist_id}","starred_url":"https://api.github.com/users/KatECN11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatECN11/subscriptions","organizations_url":"https://api.github.com/users/KatECN11/orgs","repos_url":"https://api.github.com/users/KatECN11/repos","events_url":"https://api.github.com/users/KatECN11/events{/privacy}","received_events_url":"https://api.github.com/users/KatECN11/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KatECN11/binary_translator","description":null,"fork":true,"url":"https://api.github.com/repos/KatECN11/binary_translator","forks_url":"https://api.github.com/repos/KatECN11/binary_translator/forks","keys_url":"https://api.github.com/repos/KatECN11/binary_translator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KatECN11/binary_translator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KatECN11/binary_translator/teams","hooks_url":"https://api.github.com/repos/KatECN11/binary_translator/hooks","issue_events_url":"https://api.github.com/repos/KatECN11/binary_translator/issues/events{/number}","events_url":"https://api.github.com/repos/KatECN11/binary_translator/events","assignees_url":"https://api.github.com/repos/KatECN11/binary_translator/assignees{/user}","branches_url":"https://api.github.com/repos/KatECN11/binary_translator/branches{/branch}","tags_url":"https://api.github.com/repos/KatECN11/binary_translator/tags","blobs_url":"https://api.github.com/repos/KatECN11/binary_translator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KatECN11/binary_translator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KatECN11/binary_translator/git/refs{/sha}","trees_url":"https://api.github.com/repos/KatECN11/binary_translator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KatECN11/binary_translator/statuses/{sha}","languages_url":"https://api.github.com/repos/KatECN11/binary_translator/languages","stargazers_url":"https://api.github.com/repos/KatECN11/binary_translator/stargazers","contributors_url":"https://api.github.com/repos/KatECN11/binary_translator/contributors","subscribers_url":"https://api.github.com/repos/KatECN11/binary_translator/subscribers","subscription_url":"https://api.github.com/repos/KatECN11/binary_translator/subscription","commits_url":"https://api.github.com/repos/KatECN11/binary_translator/commits{/sha}","git_commits_url":"https://api.github.com/repos/KatECN11/binary_translator/git/commits{/sha}","comments_url":"https://api.github.com/repos/KatECN11/binary_translator/comments{/number}","issue_comment_url":"https://api.github.com/repos/KatECN11/binary_translator/issues/comments{/number}","contents_url":"https://api.github.com/repos/KatECN11/binary_translator/contents/{+path}","compare_url":"https://api.github.com/repos/KatECN11/binary_translator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KatECN11/binary_translator/merges","archive_url":"https://api.github.com/repos/KatECN11/binary_translator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KatECN11/binary_translator/downloads","issues_url":"https://api.github.com/repos/KatECN11/binary_translator/issues{/number}","pulls_url":"https://api.github.com/repos/KatECN11/binary_translator/pulls{/number}","milestones_url":"https://api.github.com/repos/KatECN11/binary_translator/milestones{/number}","notifications_url":"https://api.github.com/repos/KatECN11/binary_translator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KatECN11/binary_translator/labels{/name}","releases_url":"https://api.github.com/repos/KatECN11/binary_translator/releases{/id}","deployments_url":"https://api.github.com/repos/KatECN11/binary_translator/deployments","created_at":"2018-07-05T19:01:01Z","updated_at":"2018-07-06T16:29:18Z","pushed_at":"2018-07-06T16:29:16Z","git_url":"git://github.com/KatECN11/binary_translator.git","ssh_url":"git@github.com:KatECN11/binary_translator.git","clone_url":"https://github.com/KatECN11/binary_translator.git","svn_url":"https://github.com/KatECN11/binary_translator","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"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":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"turingschool-examples:master","ref":"master","sha":"2aab39f90a8b6539bc73e5e0ef2e090dc2c0fcbd","user":{"login":"turingschool-examples","id":8518346,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTgzNDY=","avatar_url":"https://avatars3.githubusercontent.com/u/8518346?v=4","gravatar_id":"","url":"https://api.github.com/users/turingschool-examples","html_url":"https://github.com/turingschool-examples","followers_url":"https://api.github.com/users/turingschool-examples/followers","following_url":"https://api.github.com/users/turingschool-examples/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-examples/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-examples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-examples/subscriptions","organizations_url":"https://api.github.com/users/turingschool-examples/orgs","repos_url":"https://api.github.com/users/turingschool-examples/repos","events_url":"https://api.github.com/users/turingschool-examples/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-examples/received_events","type":"Organization","site_admin":false},"repo":{"id":139887750,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4ODc3NTA=","name":"binary_translator","full_name":"turingschool-examples/binary_translator","owner":{"login":"turingschool-examples","id":8518346,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTgzNDY=","avatar_url":"https://avatars3.githubusercontent.com/u/8518346?v=4","gravatar_id":"","url":"https://api.github.com/users/turingschool-examples","html_url":"https://github.com/turingschool-examples","followers_url":"https://api.github.com/users/turingschool-examples/followers","following_url":"https://api.github.com/users/turingschool-examples/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-examples/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-examples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-examples/subscriptions","organizations_url":"https://api.github.com/users/turingschool-examples/orgs","repos_url":"https://api.github.com/users/turingschool-examples/repos","events_url":"https://api.github.com/users/turingschool-examples/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-examples/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/turingschool-examples/binary_translator","description":null,"fork":false,"url":"https://api.github.com/repos/turingschool-examples/binary_translator","forks_url":"https://api.github.com/repos/turingschool-examples/binary_translator/forks","keys_url":"https://api.github.com/repos/turingschool-examples/binary_translator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/turingschool-examples/binary_translator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/turingschool-examples/binary_translator/teams","hooks_url":"https://api.github.com/repos/turingschool-examples/binary_translator/hooks","issue_events_url":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/events{/number}","events_url":"https://api.github.com/repos/turingschool-examples/binary_translator/events","assignees_url":"https://api.github.com/repos/turingschool-examples/binary_translator/assignees{/user}","branches_url":"https://api.github.com/repos/turingschool-examples/binary_translator/branches{/branch}","tags_url":"https://api.github.com/repos/turingschool-examples/binary_translator/tags","blobs_url":"https://api.github.com/repos/turingschool-examples/binary_translator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/turingschool-examples/binary_translator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/turingschool-examples/binary_translator/git/refs{/sha}","trees_url":"https://api.github.com/repos/turingschool-examples/binary_translator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/turingschool-examples/binary_translator/statuses/{sha}","languages_url":"https://api.github.com/repos/turingschool-examples/binary_translator/languages","stargazers_url":"https://api.github.com/repos/turingschool-examples/binary_translator/stargazers","contributors_url":"https://api.github.com/repos/turingschool-examples/binary_translator/contributors","subscribers_url":"https://api.github.com/repos/turingschool-examples/binary_translator/subscribers","subscription_url":"https://api.github.com/repos/turingschool-examples/binary_translator/subscription","commits_url":"https://api.github.com/repos/turingschool-examples/binary_translator/commits{/sha}","git_commits_url":"https://api.github.com/repos/turingschool-examples/binary_translator/git/commits{/sha}","comments_url":"https://api.github.com/repos/turingschool-examples/binary_translator/comments{/number}","issue_comment_url":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/comments{/number}","contents_url":"https://api.github.com/repos/turingschool-examples/binary_translator/contents/{+path}","compare_url":"https://api.github.com/repos/turingschool-examples/binary_translator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/turingschool-examples/binary_translator/merges","archive_url":"https://api.github.com/repos/turingschool-examples/binary_translator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/turingschool-examples/binary_translator/downloads","issues_url":"https://api.github.com/repos/turingschool-examples/binary_translator/issues{/number}","pulls_url":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls{/number}","milestones_url":"https://api.github.com/repos/turingschool-examples/binary_translator/milestones{/number}","notifications_url":"https://api.github.com/repos/turingschool-examples/binary_translator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/turingschool-examples/binary_translator/labels{/name}","releases_url":"https://api.github.com/repos/turingschool-examples/binary_translator/releases{/id}","deployments_url":"https://api.github.com/repos/turingschool-examples/binary_translator/deployments","created_at":"2018-07-05T18:40:31Z","updated_at":"2018-07-07T14:31:33Z","pushed_at":"2018-07-07T14:31:28Z","git_url":"git://github.com/turingschool-examples/binary_translator.git","ssh_url":"git@github.com:turingschool-examples/binary_translator.git","clone_url":"https://github.com/turingschool-examples/binary_translator.git","svn_url":"https://github.com/turingschool-examples/binary_translator","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":31,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16"},"html":{"href":"https://github.com/turingschool-examples/binary_translator/pull/16"},"issue":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/16"},"comments":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/turingschool-examples/binary_translator/statuses/c063833f7daf2fd6d40eb4f706278f5ac518ce3f"}},"author_association":"NONE"}}
{"actor":{"display_login":"BrianZanti"}}