{"action":"created","comment":{"url":"https://api.github.com/repos/isnoto/flashcards/pulls/comments/44709659","id":44709659,"diff_hunk":"@@ -1,33 +1,103 @@\n require 'rails_helper'\n \n-describe Card do\n-  let(:card) { Card.create(original_text: 'Привет', translated_text: 'ПриВЕТ') }\n+  describe Card do\n+    let!(:card) { build(:card) }\n+    let!(:wrong_card) { Card.create(original_text: 'Привет',\n+                                   translated_text: 'ПривЕТ') }\n \n-  context '#words_cannot_be_equal' do\n-    let(:card) { Card.new(original_text: 'Good', translated_text: 'GoOd') }\n+    context '#words_cannot_be_equal' do\n \n-    it 'does not pass the same words' do\n-      expect(card).not_to be_valid\n+      it 'does not pass the same words' do\n+        expect(wrong_card).not_to be_valid\n+      end\n     end\n-  end\n \n-  context '#add_review_date' do\n-    it 'equals time now + 3days' do\n-      expect(card.review_date).to eq(Date.today + 3.days)\n+    context '#prepare_word' do\n+      it 'work with cyrillic' do\n+        expect(wrong_card).not_to be_valid\n+      end\n     end\n-  end\n \n-  context '#prepare_word' do\n-    it 'work with cyrillic' do\n-      expect(card).not_to be_valid\n+    context '#check_answer' do\n+      context 'when answer is correct' do\n+        let!(:correct_answer) { card.check_answer('Hello') }\n+\n+        it 'user\\'s answer equals to original text' do\n+          expect(correct_answer).to be true\n+        end\n+\n+        it 'increment field correct_answers by 1' do\n+          expect(card.correct_answers).to eq 1\n+        end\n+      end\n+\n+      context 'when answer is incorrect' do\n+        let!(:incorrect_answer) { card.check_answer('Aloha') }","path":"spec/models/card_spec.rb","position":49,"original_position":49,"commit_id":"700817ffa9a92d3795c00b72ac3becde4ed77cbd","original_commit_id":"700817ffa9a92d3795c00b72ac3becde4ed77cbd","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 double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-11-12T20:25:25Z","updated_at":"2015-11-12T20:25:25Z","html_url":"https://github.com/isnoto/flashcards/pull/15#discussion_r44709659","pull_request_url":"https://api.github.com/repos/isnoto/flashcards/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/comments/44709659"},"html":{"href":"https://github.com/isnoto/flashcards/pull/15#discussion_r44709659"},"pull_request":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/isnoto/flashcards/pulls/15","id":50549599,"html_url":"https://github.com/isnoto/flashcards/pull/15","diff_url":"https://github.com/isnoto/flashcards/pull/15.diff","patch_url":"https://github.com/isnoto/flashcards/pull/15.patch","issue_url":"https://api.github.com/repos/isnoto/flashcards/issues/15","number":15,"state":"open","locked":false,"title":"Spaced repetition","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"body":"https://notoflashcards.herokuapp.com/","created_at":"2015-11-12T18:37:58Z","updated_at":"2015-11-12T20:25:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2516d3a0b0d250a66b7a2965ca890fe39a80f46d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/isnoto/flashcards/pulls/15/commits","review_comments_url":"https://api.github.com/repos/isnoto/flashcards/pulls/15/comments","review_comment_url":"https://api.github.com/repos/isnoto/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isnoto/flashcards/issues/15/comments","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/700817ffa9a92d3795c00b72ac3becde4ed77cbd","head":{"label":"isnoto:thirteenth-task","ref":"thirteenth-task","sha":"700817ffa9a92d3795c00b72ac3becde4ed77cbd","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"repo":{"id":42663356,"name":"flashcards","full_name":"isnoto/flashcards","owner":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isnoto/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/isnoto/flashcards","forks_url":"https://api.github.com/repos/isnoto/flashcards/forks","keys_url":"https://api.github.com/repos/isnoto/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isnoto/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isnoto/flashcards/teams","hooks_url":"https://api.github.com/repos/isnoto/flashcards/hooks","issue_events_url":"https://api.github.com/repos/isnoto/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/isnoto/flashcards/events","assignees_url":"https://api.github.com/repos/isnoto/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/isnoto/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/isnoto/flashcards/tags","blobs_url":"https://api.github.com/repos/isnoto/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isnoto/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isnoto/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/isnoto/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/isnoto/flashcards/languages","stargazers_url":"https://api.github.com/repos/isnoto/flashcards/stargazers","contributors_url":"https://api.github.com/repos/isnoto/flashcards/contributors","subscribers_url":"https://api.github.com/repos/isnoto/flashcards/subscribers","subscription_url":"https://api.github.com/repos/isnoto/flashcards/subscription","commits_url":"https://api.github.com/repos/isnoto/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/isnoto/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/isnoto/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/isnoto/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/isnoto/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/isnoto/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isnoto/flashcards/merges","archive_url":"https://api.github.com/repos/isnoto/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isnoto/flashcards/downloads","issues_url":"https://api.github.com/repos/isnoto/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/isnoto/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/isnoto/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/isnoto/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isnoto/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/isnoto/flashcards/releases{/id}","created_at":"2015-09-17T15:09:40Z","updated_at":"2015-09-22T21:20:37Z","pushed_at":"2015-11-12T20:25:16Z","git_url":"git://github.com/isnoto/flashcards.git","ssh_url":"git@github.com:isnoto/flashcards.git","clone_url":"https://github.com/isnoto/flashcards.git","svn_url":"https://github.com/isnoto/flashcards","homepage":null,"size":448,"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":"isnoto:master","ref":"master","sha":"e3266ad7cca3f663491a2ecec12994d5ef3fde8d","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"repo":{"id":42663356,"name":"flashcards","full_name":"isnoto/flashcards","owner":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isnoto/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/isnoto/flashcards","forks_url":"https://api.github.com/repos/isnoto/flashcards/forks","keys_url":"https://api.github.com/repos/isnoto/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isnoto/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isnoto/flashcards/teams","hooks_url":"https://api.github.com/repos/isnoto/flashcards/hooks","issue_events_url":"https://api.github.com/repos/isnoto/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/isnoto/flashcards/events","assignees_url":"https://api.github.com/repos/isnoto/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/isnoto/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/isnoto/flashcards/tags","blobs_url":"https://api.github.com/repos/isnoto/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isnoto/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isnoto/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/isnoto/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/isnoto/flashcards/languages","stargazers_url":"https://api.github.com/repos/isnoto/flashcards/stargazers","contributors_url":"https://api.github.com/repos/isnoto/flashcards/contributors","subscribers_url":"https://api.github.com/repos/isnoto/flashcards/subscribers","subscription_url":"https://api.github.com/repos/isnoto/flashcards/subscription","commits_url":"https://api.github.com/repos/isnoto/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/isnoto/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/isnoto/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/isnoto/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/isnoto/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/isnoto/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isnoto/flashcards/merges","archive_url":"https://api.github.com/repos/isnoto/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isnoto/flashcards/downloads","issues_url":"https://api.github.com/repos/isnoto/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/isnoto/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/isnoto/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/isnoto/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isnoto/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/isnoto/flashcards/releases{/id}","created_at":"2015-09-17T15:09:40Z","updated_at":"2015-09-22T21:20:37Z","pushed_at":"2015-11-12T20:25:16Z","git_url":"git://github.com/isnoto/flashcards.git","ssh_url":"git@github.com:isnoto/flashcards.git","clone_url":"https://github.com/isnoto/flashcards.git","svn_url":"https://github.com/isnoto/flashcards","homepage":null,"size":448,"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/isnoto/flashcards/pulls/15"},"html":{"href":"https://github.com/isnoto/flashcards/pull/15"},"issue":{"href":"https://api.github.com/repos/isnoto/flashcards/issues/15"},"comments":{"href":"https://api.github.com/repos/isnoto/flashcards/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/isnoto/flashcards/statuses/700817ffa9a92d3795c00b72ac3becde4ed77cbd"}}}}