{"action":"created","comment":{"url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments/38618816","id":38618816,"diff_hunk":"@@ -0,0 +1,39 @@\n+require 'rails_helper'\n+\n+describe Review do\n+  describe \"checks translation\" do\n+    \n+    before :each do \n+      @card = Card.create(original_text: \"way\", translated_text: \"путь\")\n+    end\n+\n+    context \"with correct answer\" do\n+      it \"returns true\" do \n+        review = Review.new(card_id: @card.id, answer: \"way\")\n+        expect(review.check_translation).to be_truthy\n+      end\n+    end\n+\n+    context \"with correct answer in different letter case\" do\n+      it \"returns true\" do \n+        review = Review.new(card_id: @card.id, answer: \"WaY\")\n+        expect(review.check_translation).to be_truthy\n+      end\n+    end\n+\n+    context \"with correct answer with trailing space\" do\n+      it \"returns true\" do \n+        review = Review.new(card_id: @card.id, answer: \"way \")\n+        expect(review.check_translation).to be_truthy\n+      end\n+    end    \n+\n+    context \"with incorrect answer\" do\n+      it \"returns false\" do \n+        review = Review.new(card_id: @card.id, answer: \"wey\")\n+        expect(review.check_translation).to be_falsey\n+      end\n+    end\n+","path":"spec/models/review_spec.rb","position":37,"original_position":37,"commit_id":"4e7c0c39b1d53c71f7befa18b112ce5e7495ab5c","original_commit_id":"4e7c0c39b1d53c71f7befa18b112ce5e7495ab5c","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":"Extra empty line detected at block body end.","created_at":"2015-09-03T07:19:34Z","updated_at":"2015-09-03T07:19:34Z","html_url":"https://github.com/yuri-polessky/flashcards/pull/6#discussion_r38618816","pull_request_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments/38618816"},"html":{"href":"https://github.com/yuri-polessky/flashcards/pull/6#discussion_r38618816"},"pull_request":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6","id":44075875,"html_url":"https://github.com/yuri-polessky/flashcards/pull/6","diff_url":"https://github.com/yuri-polessky/flashcards/pull/6.diff","patch_url":"https://github.com/yuri-polessky/flashcards/pull/6.patch","issue_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/6","number":6,"state":"open","locked":false,"title":"Create tests for model Card and Review","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-03T07:19:28Z","updated_at":"2015-09-03T07:19:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a96a0198c2db65474af6a7cbad34075b0f01f905","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6/commits","review_comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6/comments","review_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/6/comments","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/4e7c0c39b1d53c71f7befa18b112ce5e7495ab5c","head":{"label":"yuri-polessky:sixth-task","ref":"sixth-task","sha":"4e7c0c39b1d53c71f7befa18b112ce5e7495ab5c","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"repo":{"id":41664877,"name":"flashcards","full_name":"yuri-polessky/flashcards","owner":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri-polessky/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/yuri-polessky/flashcards","forks_url":"https://api.github.com/repos/yuri-polessky/flashcards/forks","keys_url":"https://api.github.com/repos/yuri-polessky/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri-polessky/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri-polessky/flashcards/teams","hooks_url":"https://api.github.com/repos/yuri-polessky/flashcards/hooks","issue_events_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/yuri-polessky/flashcards/events","assignees_url":"https://api.github.com/repos/yuri-polessky/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/yuri-polessky/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/tags","blobs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri-polessky/flashcards/languages","stargazers_url":"https://api.github.com/repos/yuri-polessky/flashcards/stargazers","contributors_url":"https://api.github.com/repos/yuri-polessky/flashcards/contributors","subscribers_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscribers","subscription_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscription","commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuri-polessky/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/yuri-polessky/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri-polessky/flashcards/merges","archive_url":"https://api.github.com/repos/yuri-polessky/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri-polessky/flashcards/downloads","issues_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri-polessky/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri-polessky/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri-polessky/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/yuri-polessky/flashcards/releases{/id}","created_at":"2015-08-31T08:35:45Z","updated_at":"2015-08-31T14:46:09Z","pushed_at":"2015-09-03T07:19:28Z","git_url":"git://github.com/yuri-polessky/flashcards.git","ssh_url":"git@github.com:yuri-polessky/flashcards.git","clone_url":"https://github.com/yuri-polessky/flashcards.git","svn_url":"https://github.com/yuri-polessky/flashcards","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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"yuri-polessky:master","ref":"master","sha":"8151d61b0ada43c68fa4aa39f7050952b3fb93b2","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"repo":{"id":41664877,"name":"flashcards","full_name":"yuri-polessky/flashcards","owner":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri-polessky/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/yuri-polessky/flashcards","forks_url":"https://api.github.com/repos/yuri-polessky/flashcards/forks","keys_url":"https://api.github.com/repos/yuri-polessky/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri-polessky/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri-polessky/flashcards/teams","hooks_url":"https://api.github.com/repos/yuri-polessky/flashcards/hooks","issue_events_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/yuri-polessky/flashcards/events","assignees_url":"https://api.github.com/repos/yuri-polessky/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/yuri-polessky/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/tags","blobs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri-polessky/flashcards/languages","stargazers_url":"https://api.github.com/repos/yuri-polessky/flashcards/stargazers","contributors_url":"https://api.github.com/repos/yuri-polessky/flashcards/contributors","subscribers_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscribers","subscription_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscription","commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuri-polessky/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/yuri-polessky/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri-polessky/flashcards/merges","archive_url":"https://api.github.com/repos/yuri-polessky/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri-polessky/flashcards/downloads","issues_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri-polessky/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri-polessky/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri-polessky/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/yuri-polessky/flashcards/releases{/id}","created_at":"2015-08-31T08:35:45Z","updated_at":"2015-08-31T14:46:09Z","pushed_at":"2015-09-03T07:19:28Z","git_url":"git://github.com/yuri-polessky/flashcards.git","ssh_url":"git@github.com:yuri-polessky/flashcards.git","clone_url":"https://github.com/yuri-polessky/flashcards.git","svn_url":"https://github.com/yuri-polessky/flashcards","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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6"},"html":{"href":"https://github.com/yuri-polessky/flashcards/pull/6"},"issue":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/issues/6"},"comments":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/4e7c0c39b1d53c71f7befa18b112ce5e7495ab5c"}}}}