{"action":"created","comment":{"url":"https://api.github.com/repos/plataformatec/devise/pulls/comments/38304254","id":38304254,"diff_hunk":"@@ -0,0 +1,21 @@\n+require 'test_helper'\n+\n+class ApiController < ActionController::Metal\n+  include Devise::Controllers::Helpers\n+end\n+\n+class HelperMethodsTest < ActionController::TestCase\n+  tests ApiController\n+\n+  test 'includes Devise::Controllers::Helpers' do\n+    assert @controller.class.ancestors.include?(Devise::Controllers::Helpers)\n+  end\n+\n+  test 'does not respond_to helper_method' do\n+    refute @controller.respond_to?(:helper_method)\n+  end\n+\n+  test 'defines methods like current_user' do\n+    assert @controller.respond_to?(:current_user)\n+  end","path":"test/controllers/helper_methods_test.rb","position":20,"original_position":20,"commit_id":"a3da40a701197961d8eae0ca0cf75300a85b7cf2","original_commit_id":"a3da40a701197961d8eae0ca0cf75300a85b7cf2","user":{"login":"carlosantoniodasilva","id":26328,"avatar_url":"https://avatars.githubusercontent.com/u/26328?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosantoniodasilva","html_url":"https://github.com/carlosantoniodasilva","followers_url":"https://api.github.com/users/carlosantoniodasilva/followers","following_url":"https://api.github.com/users/carlosantoniodasilva/following{/other_user}","gists_url":"https://api.github.com/users/carlosantoniodasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosantoniodasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosantoniodasilva/subscriptions","organizations_url":"https://api.github.com/users/carlosantoniodasilva/orgs","repos_url":"https://api.github.com/users/carlosantoniodasilva/repos","events_url":"https://api.github.com/users/carlosantoniodasilva/events{/privacy}","received_events_url":"https://api.github.com/users/carlosantoniodasilva/received_events","type":"User","site_admin":false},"body":"Please use the builtin methods: `assert_includes`, `assert_respond_to` and `refute_respond_to`. They provide nicer error messages in case of test failures.","created_at":"2015-08-31T11:44:59Z","updated_at":"2015-08-31T11:44:59Z","html_url":"https://github.com/plataformatec/devise/pull/3732#discussion_r38304254","pull_request_url":"https://api.github.com/repos/plataformatec/devise/pulls/3732","_links":{"self":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/comments/38304254"},"html":{"href":"https://github.com/plataformatec/devise/pull/3732#discussion_r38304254"},"pull_request":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/3732"}}},"pull_request":{"url":"https://api.github.com/repos/plataformatec/devise/pulls/3732","id":43691972,"html_url":"https://github.com/plataformatec/devise/pull/3732","diff_url":"https://github.com/plataformatec/devise/pull/3732.diff","patch_url":"https://github.com/plataformatec/devise/pull/3732.patch","issue_url":"https://api.github.com/repos/plataformatec/devise/issues/3732","number":3732,"state":"open","locked":false,"title":"Wrap helper_method calls in respond_to?(:helper_method)","user":{"login":"posgarou","id":8039360,"avatar_url":"https://avatars.githubusercontent.com/u/8039360?v=3","gravatar_id":"","url":"https://api.github.com/users/posgarou","html_url":"https://github.com/posgarou","followers_url":"https://api.github.com/users/posgarou/followers","following_url":"https://api.github.com/users/posgarou/following{/other_user}","gists_url":"https://api.github.com/users/posgarou/gists{/gist_id}","starred_url":"https://api.github.com/users/posgarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posgarou/subscriptions","organizations_url":"https://api.github.com/users/posgarou/orgs","repos_url":"https://api.github.com/users/posgarou/repos","events_url":"https://api.github.com/users/posgarou/events{/privacy}","received_events_url":"https://api.github.com/users/posgarou/received_events","type":"User","site_admin":false},"body":"Currently `Devise::Controllers::Helpers` depends on `#helper_method`, which is defined inside `AbstractController::Helpers`.  This module is included in `ActionController::Base`, but it is not included by default in `ActionController::Metal`.\r\n\r\n`#helper_method` is not essential to the functionality of the methods inside `Devise::Controllers::Helpers`, so this PR wraps all Devise `#helper_method` calls with `respond_to?(:helper_method)` checks.","created_at":"2015-08-29T09:39:02Z","updated_at":"2015-08-31T11:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f54fb4c3a97a59d24522c59853d1c6b9048daf7e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/plataformatec/devise/pulls/3732/commits","review_comments_url":"https://api.github.com/repos/plataformatec/devise/pulls/3732/comments","review_comment_url":"https://api.github.com/repos/plataformatec/devise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plataformatec/devise/issues/3732/comments","statuses_url":"https://api.github.com/repos/plataformatec/devise/statuses/a3da40a701197961d8eae0ca0cf75300a85b7cf2","head":{"label":"posgarou:refactor/respond_to_helper_method","ref":"refactor/respond_to_helper_method","sha":"a3da40a701197961d8eae0ca0cf75300a85b7cf2","user":{"login":"posgarou","id":8039360,"avatar_url":"https://avatars.githubusercontent.com/u/8039360?v=3","gravatar_id":"","url":"https://api.github.com/users/posgarou","html_url":"https://github.com/posgarou","followers_url":"https://api.github.com/users/posgarou/followers","following_url":"https://api.github.com/users/posgarou/following{/other_user}","gists_url":"https://api.github.com/users/posgarou/gists{/gist_id}","starred_url":"https://api.github.com/users/posgarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posgarou/subscriptions","organizations_url":"https://api.github.com/users/posgarou/orgs","repos_url":"https://api.github.com/users/posgarou/repos","events_url":"https://api.github.com/users/posgarou/events{/privacy}","received_events_url":"https://api.github.com/users/posgarou/received_events","type":"User","site_admin":false},"repo":{"id":41586593,"name":"devise","full_name":"posgarou/devise","owner":{"login":"posgarou","id":8039360,"avatar_url":"https://avatars.githubusercontent.com/u/8039360?v=3","gravatar_id":"","url":"https://api.github.com/users/posgarou","html_url":"https://github.com/posgarou","followers_url":"https://api.github.com/users/posgarou/followers","following_url":"https://api.github.com/users/posgarou/following{/other_user}","gists_url":"https://api.github.com/users/posgarou/gists{/gist_id}","starred_url":"https://api.github.com/users/posgarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posgarou/subscriptions","organizations_url":"https://api.github.com/users/posgarou/orgs","repos_url":"https://api.github.com/users/posgarou/repos","events_url":"https://api.github.com/users/posgarou/events{/privacy}","received_events_url":"https://api.github.com/users/posgarou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/posgarou/devise","description":"Flexible authentication solution for Rails with Warden.","fork":true,"url":"https://api.github.com/repos/posgarou/devise","forks_url":"https://api.github.com/repos/posgarou/devise/forks","keys_url":"https://api.github.com/repos/posgarou/devise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/posgarou/devise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/posgarou/devise/teams","hooks_url":"https://api.github.com/repos/posgarou/devise/hooks","issue_events_url":"https://api.github.com/repos/posgarou/devise/issues/events{/number}","events_url":"https://api.github.com/repos/posgarou/devise/events","assignees_url":"https://api.github.com/repos/posgarou/devise/assignees{/user}","branches_url":"https://api.github.com/repos/posgarou/devise/branches{/branch}","tags_url":"https://api.github.com/repos/posgarou/devise/tags","blobs_url":"https://api.github.com/repos/posgarou/devise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/posgarou/devise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/posgarou/devise/git/refs{/sha}","trees_url":"https://api.github.com/repos/posgarou/devise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/posgarou/devise/statuses/{sha}","languages_url":"https://api.github.com/repos/posgarou/devise/languages","stargazers_url":"https://api.github.com/repos/posgarou/devise/stargazers","contributors_url":"https://api.github.com/repos/posgarou/devise/contributors","subscribers_url":"https://api.github.com/repos/posgarou/devise/subscribers","subscription_url":"https://api.github.com/repos/posgarou/devise/subscription","commits_url":"https://api.github.com/repos/posgarou/devise/commits{/sha}","git_commits_url":"https://api.github.com/repos/posgarou/devise/git/commits{/sha}","comments_url":"https://api.github.com/repos/posgarou/devise/comments{/number}","issue_comment_url":"https://api.github.com/repos/posgarou/devise/issues/comments{/number}","contents_url":"https://api.github.com/repos/posgarou/devise/contents/{+path}","compare_url":"https://api.github.com/repos/posgarou/devise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/posgarou/devise/merges","archive_url":"https://api.github.com/repos/posgarou/devise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/posgarou/devise/downloads","issues_url":"https://api.github.com/repos/posgarou/devise/issues{/number}","pulls_url":"https://api.github.com/repos/posgarou/devise/pulls{/number}","milestones_url":"https://api.github.com/repos/posgarou/devise/milestones{/number}","notifications_url":"https://api.github.com/repos/posgarou/devise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/posgarou/devise/labels{/name}","releases_url":"https://api.github.com/repos/posgarou/devise/releases{/id}","created_at":"2015-08-29T08:39:52Z","updated_at":"2015-08-29T08:39:56Z","pushed_at":"2015-08-29T09:29:59Z","git_url":"git://github.com/posgarou/devise.git","ssh_url":"git@github.com:posgarou/devise.git","clone_url":"https://github.com/posgarou/devise.git","svn_url":"https://github.com/posgarou/devise","homepage":"http://blog.plataformatec.com.br/tag/devise/","size":11746,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"plataformatec:master","ref":"master","sha":"40258bf100c023f785ec0b4b730604da60f31b3f","user":{"login":"plataformatec","id":127679,"avatar_url":"https://avatars.githubusercontent.com/u/127679?v=3","gravatar_id":"","url":"https://api.github.com/users/plataformatec","html_url":"https://github.com/plataformatec","followers_url":"https://api.github.com/users/plataformatec/followers","following_url":"https://api.github.com/users/plataformatec/following{/other_user}","gists_url":"https://api.github.com/users/plataformatec/gists{/gist_id}","starred_url":"https://api.github.com/users/plataformatec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plataformatec/subscriptions","organizations_url":"https://api.github.com/users/plataformatec/orgs","repos_url":"https://api.github.com/users/plataformatec/repos","events_url":"https://api.github.com/users/plataformatec/events{/privacy}","received_events_url":"https://api.github.com/users/plataformatec/received_events","type":"Organization","site_admin":false},"repo":{"id":308770,"name":"devise","full_name":"plataformatec/devise","owner":{"login":"plataformatec","id":127679,"avatar_url":"https://avatars.githubusercontent.com/u/127679?v=3","gravatar_id":"","url":"https://api.github.com/users/plataformatec","html_url":"https://github.com/plataformatec","followers_url":"https://api.github.com/users/plataformatec/followers","following_url":"https://api.github.com/users/plataformatec/following{/other_user}","gists_url":"https://api.github.com/users/plataformatec/gists{/gist_id}","starred_url":"https://api.github.com/users/plataformatec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plataformatec/subscriptions","organizations_url":"https://api.github.com/users/plataformatec/orgs","repos_url":"https://api.github.com/users/plataformatec/repos","events_url":"https://api.github.com/users/plataformatec/events{/privacy}","received_events_url":"https://api.github.com/users/plataformatec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plataformatec/devise","description":"Flexible authentication solution for Rails with Warden.","fork":false,"url":"https://api.github.com/repos/plataformatec/devise","forks_url":"https://api.github.com/repos/plataformatec/devise/forks","keys_url":"https://api.github.com/repos/plataformatec/devise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plataformatec/devise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plataformatec/devise/teams","hooks_url":"https://api.github.com/repos/plataformatec/devise/hooks","issue_events_url":"https://api.github.com/repos/plataformatec/devise/issues/events{/number}","events_url":"https://api.github.com/repos/plataformatec/devise/events","assignees_url":"https://api.github.com/repos/plataformatec/devise/assignees{/user}","branches_url":"https://api.github.com/repos/plataformatec/devise/branches{/branch}","tags_url":"https://api.github.com/repos/plataformatec/devise/tags","blobs_url":"https://api.github.com/repos/plataformatec/devise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plataformatec/devise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plataformatec/devise/git/refs{/sha}","trees_url":"https://api.github.com/repos/plataformatec/devise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plataformatec/devise/statuses/{sha}","languages_url":"https://api.github.com/repos/plataformatec/devise/languages","stargazers_url":"https://api.github.com/repos/plataformatec/devise/stargazers","contributors_url":"https://api.github.com/repos/plataformatec/devise/contributors","subscribers_url":"https://api.github.com/repos/plataformatec/devise/subscribers","subscription_url":"https://api.github.com/repos/plataformatec/devise/subscription","commits_url":"https://api.github.com/repos/plataformatec/devise/commits{/sha}","git_commits_url":"https://api.github.com/repos/plataformatec/devise/git/commits{/sha}","comments_url":"https://api.github.com/repos/plataformatec/devise/comments{/number}","issue_comment_url":"https://api.github.com/repos/plataformatec/devise/issues/comments{/number}","contents_url":"https://api.github.com/repos/plataformatec/devise/contents/{+path}","compare_url":"https://api.github.com/repos/plataformatec/devise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plataformatec/devise/merges","archive_url":"https://api.github.com/repos/plataformatec/devise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plataformatec/devise/downloads","issues_url":"https://api.github.com/repos/plataformatec/devise/issues{/number}","pulls_url":"https://api.github.com/repos/plataformatec/devise/pulls{/number}","milestones_url":"https://api.github.com/repos/plataformatec/devise/milestones{/number}","notifications_url":"https://api.github.com/repos/plataformatec/devise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plataformatec/devise/labels{/name}","releases_url":"https://api.github.com/repos/plataformatec/devise/releases{/id}","created_at":"2009-09-16T12:15:12Z","updated_at":"2015-08-31T08:14:31Z","pushed_at":"2015-08-29T09:39:02Z","git_url":"git://github.com/plataformatec/devise.git","ssh_url":"git@github.com:plataformatec/devise.git","clone_url":"https://github.com/plataformatec/devise.git","svn_url":"https://github.com/plataformatec/devise","homepage":"http://blog.plataformatec.com.br/tag/devise/","size":11746,"stargazers_count":13550,"watchers_count":13550,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2912,"mirror_url":null,"open_issues_count":25,"forks":2912,"open_issues":25,"watchers":13550,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/3732"},"html":{"href":"https://github.com/plataformatec/devise/pull/3732"},"issue":{"href":"https://api.github.com/repos/plataformatec/devise/issues/3732"},"comments":{"href":"https://api.github.com/repos/plataformatec/devise/issues/3732/comments"},"review_comments":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/3732/comments"},"review_comment":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plataformatec/devise/pulls/3732/commits"},"statuses":{"href":"https://api.github.com/repos/plataformatec/devise/statuses/a3da40a701197961d8eae0ca0cf75300a85b7cf2"}}}}