{"action":"created","comment":{"url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/comments/27295128","id":27295128,"diff_hunk":"@@ -0,0 +1,62 @@\n+require 'rails_helper'\n+\n+describe \"review cards\" do\n+  describe \"training without cards\" do\n+    before do\n+      create(:card)\n+      visit root_path\n+    end\n+\n+    it 'no cards' do\n+      expect(page).to have_content 'Ожидайте наступления даты пересмотра.'\n+    end\n+  end\n+\n+  describe \"training with some cards\" do\n+    before do\n+      2.times do\n+        card = create(:card)\n+        card.update_attribute(:review_date, Time.now)\n+        visit root_path\n+      end\n+    end\n+\n+    it 'first visit' do\n+      expect(page).to have_content 'Original text'\n+    end\n+\n+    it 'incorrect translation' do\n+      fill_in 'user_translation', with: 'RoR'\n+      click_button 'Проверить'\n+      expect(page).\n+          to have_content 'Вы ввели не верный перевод. Повторите попытку.'\n+    end\n+\n+    it 'correct translation' do\n+      fill_in 'user_translation', with: 'house'\n+      click_button 'Проверить'\n+      expect(page).to have_content 'Вы ввели верный перевод. Продолжайте.'\n+    end\n+  end\n+\n+  describe \"training with one card\" do\n+    before do\n+      card = create(:card)\n+      card.update_attribute(:review_date, Time.now)\n+      visit root_path\n+    end\n+\n+    it 'incorrect translation' do\n+      fill_in 'user_translation', with: 'RoR'\n+      click_button 'Проверить'\n+      expect(page).\n+          to have_content 'Вы ввели не верный перевод. Повторите попытку.'","path":"spec/features/trainer_spec.rb","position":53,"original_position":53,"commit_id":"cfbf4b3b94477fad7ef60a0e953ef8c613a35dec","original_commit_id":"cfbf4b3b94477fad7ef60a0e953ef8c613a35dec","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":"Use 2 (not 4) spaces for indenting an expression spanning multiple lines.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-03-27T13:45:28Z","updated_at":"2015-03-27T13:45:28Z","html_url":"https://github.com/elavretskiy/flashcards/pull/7#discussion_r27295128","pull_request_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/comments/27295128"},"html":{"href":"https://github.com/elavretskiy/flashcards/pull/7#discussion_r27295128"},"pull_request":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7","id":32021970,"html_url":"https://github.com/elavretskiy/flashcards/pull/7","diff_url":"https://github.com/elavretskiy/flashcards/pull/7.diff","patch_url":"https://github.com/elavretskiy/flashcards/pull/7.patch","issue_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/7","number":7,"state":"open","locked":false,"title":"Seventh task","user":{"login":"elavretskiy","id":10075473,"avatar_url":"https://avatars.githubusercontent.com/u/10075473?v=3","gravatar_id":"","url":"https://api.github.com/users/elavretskiy","html_url":"https://github.com/elavretskiy","followers_url":"https://api.github.com/users/elavretskiy/followers","following_url":"https://api.github.com/users/elavretskiy/following{/other_user}","gists_url":"https://api.github.com/users/elavretskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/elavretskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elavretskiy/subscriptions","organizations_url":"https://api.github.com/users/elavretskiy/orgs","repos_url":"https://api.github.com/users/elavretskiy/repos","events_url":"https://api.github.com/users/elavretskiy/events{/privacy}","received_events_url":"https://api.github.com/users/elavretskiy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-26T14:26:45Z","updated_at":"2015-03-27T13:45:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"772ae400e3b517506060ad3708dd7a107702b6de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7/commits","review_comments_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7/comments","review_comment_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/7/comments","statuses_url":"https://api.github.com/repos/elavretskiy/flashcards/statuses/cfbf4b3b94477fad7ef60a0e953ef8c613a35dec","head":{"label":"elavretskiy:seventh-task","ref":"seventh-task","sha":"cfbf4b3b94477fad7ef60a0e953ef8c613a35dec","user":{"login":"elavretskiy","id":10075473,"avatar_url":"https://avatars.githubusercontent.com/u/10075473?v=3","gravatar_id":"","url":"https://api.github.com/users/elavretskiy","html_url":"https://github.com/elavretskiy","followers_url":"https://api.github.com/users/elavretskiy/followers","following_url":"https://api.github.com/users/elavretskiy/following{/other_user}","gists_url":"https://api.github.com/users/elavretskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/elavretskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elavretskiy/subscriptions","organizations_url":"https://api.github.com/users/elavretskiy/orgs","repos_url":"https://api.github.com/users/elavretskiy/repos","events_url":"https://api.github.com/users/elavretskiy/events{/privacy}","received_events_url":"https://api.github.com/users/elavretskiy/received_events","type":"User","site_admin":false},"repo":{"id":32740872,"name":"flashcards","full_name":"elavretskiy/flashcards","owner":{"login":"elavretskiy","id":10075473,"avatar_url":"https://avatars.githubusercontent.com/u/10075473?v=3","gravatar_id":"","url":"https://api.github.com/users/elavretskiy","html_url":"https://github.com/elavretskiy","followers_url":"https://api.github.com/users/elavretskiy/followers","following_url":"https://api.github.com/users/elavretskiy/following{/other_user}","gists_url":"https://api.github.com/users/elavretskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/elavretskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elavretskiy/subscriptions","organizations_url":"https://api.github.com/users/elavretskiy/orgs","repos_url":"https://api.github.com/users/elavretskiy/repos","events_url":"https://api.github.com/users/elavretskiy/events{/privacy}","received_events_url":"https://api.github.com/users/elavretskiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elavretskiy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/elavretskiy/flashcards","forks_url":"https://api.github.com/repos/elavretskiy/flashcards/forks","keys_url":"https://api.github.com/repos/elavretskiy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elavretskiy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elavretskiy/flashcards/teams","hooks_url":"https://api.github.com/repos/elavretskiy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/elavretskiy/flashcards/events","assignees_url":"https://api.github.com/repos/elavretskiy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/elavretskiy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/elavretskiy/flashcards/tags","blobs_url":"https://api.github.com/repos/elavretskiy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elavretskiy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elavretskiy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/elavretskiy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elavretskiy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/elavretskiy/flashcards/languages","stargazers_url":"https://api.github.com/repos/elavretskiy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/elavretskiy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/elavretskiy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/elavretskiy/flashcards/subscription","commits_url":"https://api.github.com/repos/elavretskiy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/elavretskiy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/elavretskiy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/elavretskiy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/elavretskiy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elavretskiy/flashcards/merges","archive_url":"https://api.github.com/repos/elavretskiy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elavretskiy/flashcards/downloads","issues_url":"https://api.github.com/repos/elavretskiy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/elavretskiy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/elavretskiy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elavretskiy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/elavretskiy/flashcards/releases{/id}","created_at":"2015-03-23T15:28:49Z","updated_at":"2015-03-26T11:36:06Z","pushed_at":"2015-03-27T13:45:23Z","git_url":"git://github.com/elavretskiy/flashcards.git","ssh_url":"git@github.com:elavretskiy/flashcards.git","clone_url":"https://github.com/elavretskiy/flashcards.git","svn_url":"https://github.com/elavretskiy/flashcards","homepage":null,"size":512,"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":"first-task"}},"base":{"label":"elavretskiy:first-task","ref":"first-task","sha":"ec4b873f5f204d51d95471ac60e6b8fb41bb7d56","user":{"login":"elavretskiy","id":10075473,"avatar_url":"https://avatars.githubusercontent.com/u/10075473?v=3","gravatar_id":"","url":"https://api.github.com/users/elavretskiy","html_url":"https://github.com/elavretskiy","followers_url":"https://api.github.com/users/elavretskiy/followers","following_url":"https://api.github.com/users/elavretskiy/following{/other_user}","gists_url":"https://api.github.com/users/elavretskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/elavretskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elavretskiy/subscriptions","organizations_url":"https://api.github.com/users/elavretskiy/orgs","repos_url":"https://api.github.com/users/elavretskiy/repos","events_url":"https://api.github.com/users/elavretskiy/events{/privacy}","received_events_url":"https://api.github.com/users/elavretskiy/received_events","type":"User","site_admin":false},"repo":{"id":32740872,"name":"flashcards","full_name":"elavretskiy/flashcards","owner":{"login":"elavretskiy","id":10075473,"avatar_url":"https://avatars.githubusercontent.com/u/10075473?v=3","gravatar_id":"","url":"https://api.github.com/users/elavretskiy","html_url":"https://github.com/elavretskiy","followers_url":"https://api.github.com/users/elavretskiy/followers","following_url":"https://api.github.com/users/elavretskiy/following{/other_user}","gists_url":"https://api.github.com/users/elavretskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/elavretskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elavretskiy/subscriptions","organizations_url":"https://api.github.com/users/elavretskiy/orgs","repos_url":"https://api.github.com/users/elavretskiy/repos","events_url":"https://api.github.com/users/elavretskiy/events{/privacy}","received_events_url":"https://api.github.com/users/elavretskiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elavretskiy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/elavretskiy/flashcards","forks_url":"https://api.github.com/repos/elavretskiy/flashcards/forks","keys_url":"https://api.github.com/repos/elavretskiy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elavretskiy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elavretskiy/flashcards/teams","hooks_url":"https://api.github.com/repos/elavretskiy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/elavretskiy/flashcards/events","assignees_url":"https://api.github.com/repos/elavretskiy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/elavretskiy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/elavretskiy/flashcards/tags","blobs_url":"https://api.github.com/repos/elavretskiy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elavretskiy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elavretskiy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/elavretskiy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elavretskiy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/elavretskiy/flashcards/languages","stargazers_url":"https://api.github.com/repos/elavretskiy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/elavretskiy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/elavretskiy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/elavretskiy/flashcards/subscription","commits_url":"https://api.github.com/repos/elavretskiy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/elavretskiy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/elavretskiy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/elavretskiy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/elavretskiy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/elavretskiy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elavretskiy/flashcards/merges","archive_url":"https://api.github.com/repos/elavretskiy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elavretskiy/flashcards/downloads","issues_url":"https://api.github.com/repos/elavretskiy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/elavretskiy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/elavretskiy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/elavretskiy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elavretskiy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/elavretskiy/flashcards/releases{/id}","created_at":"2015-03-23T15:28:49Z","updated_at":"2015-03-26T11:36:06Z","pushed_at":"2015-03-27T13:45:23Z","git_url":"git://github.com/elavretskiy/flashcards.git","ssh_url":"git@github.com:elavretskiy/flashcards.git","clone_url":"https://github.com/elavretskiy/flashcards.git","svn_url":"https://github.com/elavretskiy/flashcards","homepage":null,"size":512,"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":"first-task"}},"_links":{"self":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7"},"html":{"href":"https://github.com/elavretskiy/flashcards/pull/7"},"issue":{"href":"https://api.github.com/repos/elavretskiy/flashcards/issues/7"},"comments":{"href":"https://api.github.com/repos/elavretskiy/flashcards/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elavretskiy/flashcards/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/elavretskiy/flashcards/statuses/cfbf4b3b94477fad7ef60a0e953ef8c613a35dec"}}}}