{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/201631411","pull_request_review_id":136168644,"id":201631411,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTYzMTQxMQ==","diff_hunk":"@@ -200,70 +233,98 @@ def setup\n         \"test\"        => { \"database\" => \"test-db\" },\n         \"production\"  => { \"url\" => \"prod-db-url\" }\n       }\n-\n-      ActiveRecord::Base.stubs(:configurations).returns(@configurations)\n-      ActiveRecord::Base.stubs(:establish_connection)\n     end\n \n     def test_creates_current_environment_database\n-      assert_called_with(\n-        ActiveRecord::Tasks::DatabaseTasks,\n-        :create,\n-        [\"database\" => \"test-db\"],\n-      ) do\n-        ActiveRecord::Tasks::DatabaseTasks.create_current(\n-          ActiveSupport::StringInquirer.new(\"test\")\n-        )\n+      with_stubbed_configurations_establish_connection do\n+        assert_called_with(\n+          ActiveRecord::Tasks::DatabaseTasks,\n+          :create,\n+          [\"database\" => \"test-db\"],\n+        ) do\n+          ActiveRecord::Tasks::DatabaseTasks.create_current(\n+            ActiveSupport::StringInquirer.new(\"test\")\n+          )\n+        end\n       end\n     end\n \n     def test_creates_current_environment_database_with_url\n-      assert_called_with(\n-        ActiveRecord::Tasks::DatabaseTasks,\n-        :create,\n-        [\"url\" => \"prod-db-url\"],\n-      ) do\n-        ActiveRecord::Tasks::DatabaseTasks.create_current(\n-          ActiveSupport::StringInquirer.new(\"production\")\n-        )\n+      with_stubbed_configurations_establish_connection do\n+        assert_called_with(\n+          ActiveRecord::Tasks::DatabaseTasks,\n+          :create,\n+          [\"url\" => \"prod-db-url\"],\n+        ) do\n+          ActiveRecord::Tasks::DatabaseTasks.create_current(\n+            ActiveSupport::StringInquirer.new(\"production\")\n+          )\n+        end\n       end\n     end\n \n     def test_creates_test_and_development_databases_when_env_was_not_specified\n-      ActiveRecord::Tasks::DatabaseTasks.expects(:create).\n-        with(\"database\" => \"dev-db\")\n-      ActiveRecord::Tasks::DatabaseTasks.expects(:create).\n-        with(\"database\" => \"test-db\")\n-\n-      ActiveRecord::Tasks::DatabaseTasks.create_current(\n-        ActiveSupport::StringInquirer.new(\"development\")\n-      )\n+      with_stubbed_configurations_establish_connection do\n+        assert_called_with(\n+          ActiveRecord::Tasks::DatabaseTasks,\n+          :create,\n+          [\n+            [\"database\" => \"dev-db\"],\n+            [\"database\" => \"test-db\"]\n+          ],\n+          returns: true\n+        ) do\n+          ActiveRecord::Tasks::DatabaseTasks.create_current(\n+            ActiveSupport::StringInquirer.new(\"development\")\n+          )\n+        end\n+      end\n     end\n \n     def test_creates_test_and_development_databases_when_rails_env_is_development\n       old_env = ENV[\"RAILS_ENV\"]\n       ENV[\"RAILS_ENV\"] = \"development\"\n-      ActiveRecord::Tasks::DatabaseTasks.expects(:create).\n-        with(\"database\" => \"dev-db\")\n-      ActiveRecord::Tasks::DatabaseTasks.expects(:create).\n-        with(\"database\" => \"test-db\")\n \n-      ActiveRecord::Tasks::DatabaseTasks.create_current(\n-        ActiveSupport::StringInquirer.new(\"development\")\n-      )\n+      with_stubbed_configurations_establish_connection do\n+        assert_called_with(\n+          ActiveRecord::Tasks::DatabaseTasks,\n+          :create,\n+          [\n+            [\"database\" => \"dev-db\"],\n+            [\"database\" => \"test-db\"]\n+          ],\n+          returns: true","path":"activerecord/test/cases/tasks/database_tasks_test.rb","position":181,"original_position":209,"commit_id":"e3295b3ac049e681a5644ba71a722dcbe8d15bc7","original_commit_id":"e3295b3ac049e681a5644ba71a722dcbe8d15bc7","user":{"login":"bogdanvlviv","id":6443532,"node_id":"MDQ6VXNlcjY0NDM1MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6443532?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdanvlviv","html_url":"https://github.com/bogdanvlviv","followers_url":"https://api.github.com/users/bogdanvlviv/followers","following_url":"https://api.github.com/users/bogdanvlviv/following{/other_user}","gists_url":"https://api.github.com/users/bogdanvlviv/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanvlviv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanvlviv/subscriptions","organizations_url":"https://api.github.com/users/bogdanvlviv/orgs","repos_url":"https://api.github.com/users/bogdanvlviv/repos","events_url":"https://api.github.com/users/bogdanvlviv/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanvlviv/received_events","type":"User","site_admin":false},"body":"Seme here. or may be we should add this for all the kind of test in order to ensure that db's were created?","created_at":"2018-07-11T09:56:17Z","updated_at":"2018-07-11T09:56:18Z","html_url":"https://github.com/rails/rails/pull/33337#discussion_r201631411","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/33337","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/201631411"},"html":{"href":"https://github.com/rails/rails/pull/33337#discussion_r201631411"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/33337"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/33337","id":200533410,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTMzNDEw","html_url":"https://github.com/rails/rails/pull/33337","diff_url":"https://github.com/rails/rails/pull/33337.diff","patch_url":"https://github.com/rails/rails/pull/33337.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/33337","number":33337,"state":"open","locked":false,"title":"Stub with minitest not mocha","user":{"login":"utilum","id":6261109,"node_id":"MDQ6VXNlcjYyNjExMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6261109?v=4","gravatar_id":"","url":"https://api.github.com/users/utilum","html_url":"https://github.com/utilum","followers_url":"https://api.github.com/users/utilum/followers","following_url":"https://api.github.com/users/utilum/following{/other_user}","gists_url":"https://api.github.com/users/utilum/gists{/gist_id}","starred_url":"https://api.github.com/users/utilum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utilum/subscriptions","organizations_url":"https://api.github.com/users/utilum/orgs","repos_url":"https://api.github.com/users/utilum/repos","events_url":"https://api.github.com/users/utilum/events{/privacy}","received_events_url":"https://api.github.com/users/utilum/received_events","type":"User","site_admin":false},"body":"Step 4 in #33162 \r\n\r\nAlso remove two stub return values following comments on #33326","created_at":"2018-07-10T21:49:25Z","updated_at":"2018-07-11T09:56:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de70405f1075fb3561df0ab0b7854aba526c50f2","assignee":{"login":"schneems","id":59744,"node_id":"MDQ6VXNlcjU5NzQ0","avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"assignees":[{"login":"schneems","id":59744,"node_id":"MDQ6VXNlcjU5NzQ0","avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/33337/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/33337/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/33337/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/e3295b3ac049e681a5644ba71a722dcbe8d15bc7","head":{"label":"utilum:stub_with_minitest_not_mocha","ref":"stub_with_minitest_not_mocha","sha":"e3295b3ac049e681a5644ba71a722dcbe8d15bc7","user":{"login":"utilum","id":6261109,"node_id":"MDQ6VXNlcjYyNjExMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6261109?v=4","gravatar_id":"","url":"https://api.github.com/users/utilum","html_url":"https://github.com/utilum","followers_url":"https://api.github.com/users/utilum/followers","following_url":"https://api.github.com/users/utilum/following{/other_user}","gists_url":"https://api.github.com/users/utilum/gists{/gist_id}","starred_url":"https://api.github.com/users/utilum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utilum/subscriptions","organizations_url":"https://api.github.com/users/utilum/orgs","repos_url":"https://api.github.com/users/utilum/repos","events_url":"https://api.github.com/users/utilum/events{/privacy}","received_events_url":"https://api.github.com/users/utilum/received_events","type":"User","site_admin":false},"repo":{"id":55279812,"node_id":"MDEwOlJlcG9zaXRvcnk1NTI3OTgxMg==","name":"rails","full_name":"utilum/rails","owner":{"login":"utilum","id":6261109,"node_id":"MDQ6VXNlcjYyNjExMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6261109?v=4","gravatar_id":"","url":"https://api.github.com/users/utilum","html_url":"https://github.com/utilum","followers_url":"https://api.github.com/users/utilum/followers","following_url":"https://api.github.com/users/utilum/following{/other_user}","gists_url":"https://api.github.com/users/utilum/gists{/gist_id}","starred_url":"https://api.github.com/users/utilum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utilum/subscriptions","organizations_url":"https://api.github.com/users/utilum/orgs","repos_url":"https://api.github.com/users/utilum/repos","events_url":"https://api.github.com/users/utilum/events{/privacy}","received_events_url":"https://api.github.com/users/utilum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/utilum/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/utilum/rails","forks_url":"https://api.github.com/repos/utilum/rails/forks","keys_url":"https://api.github.com/repos/utilum/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/utilum/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/utilum/rails/teams","hooks_url":"https://api.github.com/repos/utilum/rails/hooks","issue_events_url":"https://api.github.com/repos/utilum/rails/issues/events{/number}","events_url":"https://api.github.com/repos/utilum/rails/events","assignees_url":"https://api.github.com/repos/utilum/rails/assignees{/user}","branches_url":"https://api.github.com/repos/utilum/rails/branches{/branch}","tags_url":"https://api.github.com/repos/utilum/rails/tags","blobs_url":"https://api.github.com/repos/utilum/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/utilum/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/utilum/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/utilum/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/utilum/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/utilum/rails/languages","stargazers_url":"https://api.github.com/repos/utilum/rails/stargazers","contributors_url":"https://api.github.com/repos/utilum/rails/contributors","subscribers_url":"https://api.github.com/repos/utilum/rails/subscribers","subscription_url":"https://api.github.com/repos/utilum/rails/subscription","commits_url":"https://api.github.com/repos/utilum/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/utilum/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/utilum/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/utilum/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/utilum/rails/contents/{+path}","compare_url":"https://api.github.com/repos/utilum/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/utilum/rails/merges","archive_url":"https://api.github.com/repos/utilum/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/utilum/rails/downloads","issues_url":"https://api.github.com/repos/utilum/rails/issues{/number}","pulls_url":"https://api.github.com/repos/utilum/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/utilum/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/utilum/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/utilum/rails/labels{/name}","releases_url":"https://api.github.com/repos/utilum/rails/releases{/id}","deployments_url":"https://api.github.com/repos/utilum/rails/deployments","created_at":"2016-04-02T05:42:21Z","updated_at":"2018-06-20T12:19:38Z","pushed_at":"2018-07-10T23:06:31Z","git_url":"git://github.com/utilum/rails.git","ssh_url":"git@github.com:utilum/rails.git","clone_url":"https://github.com/utilum/rails.git","svn_url":"https://github.com/utilum/rails","homepage":"http://rubyonrails.org","size":158263,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"7fc499d1353f98b96c09ee755045e4aa37880962","user":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"node_id":"MDEwOlJlcG9zaXRvcnk4NTE0","name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2018-07-11T09:12:03Z","pushed_at":"2018-07-11T06:41:58Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":164349,"stargazers_count":40149,"watchers_count":40149,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16200,"mirror_url":null,"archived":false,"open_issues_count":1134,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16200,"open_issues":1134,"watchers":40149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/33337"},"html":{"href":"https://github.com/rails/rails/pull/33337"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/33337"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/33337/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/33337/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/33337/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/e3295b3ac049e681a5644ba71a722dcbe8d15bc7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bogdanvlviv"}}