{"action":"created","comment":{"url":"https://api.github.com/repos/daveshah/stubby/pulls/comments/172644976","pull_request_review_id":101698356,"id":172644976,"diff_hunk":"@@ -16,6 +16,16 @@ defmodule StubbyTest do\n     use Stubby, for: [StubbyTest.FakeBehaviour, StubbyTest.FakeBehaviour2]\n   end\n \n+  defmodule TestModule do\n+    def some_function, do: :ok\n+    def some_function(arg), do: {:ok, arg}\n+    def some_other_function, do: :ok\n+  end\n+\n+  defmodule TestModuleStub do\n+    use Stubby, module: StubbyTest.TestModule","path":"test/stubby_test.exs","position":11,"original_position":11,"commit_id":"739d9c8f2af27c587fe0b50706131daa21c11e96","original_commit_id":"739d9c8f2af27c587fe0b50706131daa21c11e96","user":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"body":"Thanks Joel! I dig these. I added a few issues to add support for this. I thought your suggestions were great (hence the issue creation). Thanks for the feedback! 👍 ","created_at":"2018-03-06T20:12:36Z","updated_at":"2018-03-06T20:12:36Z","html_url":"https://github.com/daveshah/stubby/pull/4#discussion_r172644976","pull_request_url":"https://api.github.com/repos/daveshah/stubby/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/comments/172644976"},"html":{"href":"https://github.com/daveshah/stubby/pull/4#discussion_r172644976"},"pull_request":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/4"}},"in_reply_to_id":172631027},"pull_request":{"url":"https://api.github.com/repos/daveshah/stubby/pulls/4","id":173254055,"html_url":"https://github.com/daveshah/stubby/pull/4","diff_url":"https://github.com/daveshah/stubby/pull/4.diff","patch_url":"https://github.com/daveshah/stubby/pull/4.patch","issue_url":"https://api.github.com/repos/daveshah/stubby/issues/4","number":4,"state":"open","locked":false,"title":"Adds support for stubbing out plain-old-modules","user":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"body":"This PR allows for stubs to be created from plain-old modules.\r\nex:\r\n```elixir\r\ndefmodule SomeStub do\r\n use Stubby, module: RealModule\r\nend\r\n```\r\ndefining the above will introspect on `RealModule` and allow a user of Stubby to create stub return calls for any function defined in `RealModule`:\r\n\r\nex:\r\n```elixir\r\nSomeStub.stub(:some_function_in_real_module, fn (foo) -> \"#{foo}'s - are awesome!\" end)\r\n\r\nassert SomeStub.some_function_in_real_module(\"🤖\") == \"🤖's are awesome!\"\r\n\r\n```\r\n\r\nCloses #3 ","created_at":"2018-03-06T19:14:04Z","updated_at":"2018-03-06T20:12:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e39729f2ca15b555d7901300a9a23e0eb8051d65","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/daveshah/stubby/pulls/4/commits","review_comments_url":"https://api.github.com/repos/daveshah/stubby/pulls/4/comments","review_comment_url":"https://api.github.com/repos/daveshah/stubby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daveshah/stubby/issues/4/comments","statuses_url":"https://api.github.com/repos/daveshah/stubby/statuses/739d9c8f2af27c587fe0b50706131daa21c11e96","head":{"label":"daveshah:stub-out-plain-old-modules","ref":"stub-out-plain-old-modules","sha":"739d9c8f2af27c587fe0b50706131daa21c11e96","user":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"repo":{"id":123195032,"name":"stubby","full_name":"daveshah/stubby","owner":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daveshah/stubby","description":"Stubs: Simple, dependable, easy to reason about.","fork":false,"url":"https://api.github.com/repos/daveshah/stubby","forks_url":"https://api.github.com/repos/daveshah/stubby/forks","keys_url":"https://api.github.com/repos/daveshah/stubby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daveshah/stubby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daveshah/stubby/teams","hooks_url":"https://api.github.com/repos/daveshah/stubby/hooks","issue_events_url":"https://api.github.com/repos/daveshah/stubby/issues/events{/number}","events_url":"https://api.github.com/repos/daveshah/stubby/events","assignees_url":"https://api.github.com/repos/daveshah/stubby/assignees{/user}","branches_url":"https://api.github.com/repos/daveshah/stubby/branches{/branch}","tags_url":"https://api.github.com/repos/daveshah/stubby/tags","blobs_url":"https://api.github.com/repos/daveshah/stubby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daveshah/stubby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daveshah/stubby/git/refs{/sha}","trees_url":"https://api.github.com/repos/daveshah/stubby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daveshah/stubby/statuses/{sha}","languages_url":"https://api.github.com/repos/daveshah/stubby/languages","stargazers_url":"https://api.github.com/repos/daveshah/stubby/stargazers","contributors_url":"https://api.github.com/repos/daveshah/stubby/contributors","subscribers_url":"https://api.github.com/repos/daveshah/stubby/subscribers","subscription_url":"https://api.github.com/repos/daveshah/stubby/subscription","commits_url":"https://api.github.com/repos/daveshah/stubby/commits{/sha}","git_commits_url":"https://api.github.com/repos/daveshah/stubby/git/commits{/sha}","comments_url":"https://api.github.com/repos/daveshah/stubby/comments{/number}","issue_comment_url":"https://api.github.com/repos/daveshah/stubby/issues/comments{/number}","contents_url":"https://api.github.com/repos/daveshah/stubby/contents/{+path}","compare_url":"https://api.github.com/repos/daveshah/stubby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daveshah/stubby/merges","archive_url":"https://api.github.com/repos/daveshah/stubby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daveshah/stubby/downloads","issues_url":"https://api.github.com/repos/daveshah/stubby/issues{/number}","pulls_url":"https://api.github.com/repos/daveshah/stubby/pulls{/number}","milestones_url":"https://api.github.com/repos/daveshah/stubby/milestones{/number}","notifications_url":"https://api.github.com/repos/daveshah/stubby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daveshah/stubby/labels{/name}","releases_url":"https://api.github.com/repos/daveshah/stubby/releases{/id}","deployments_url":"https://api.github.com/repos/daveshah/stubby/deployments","created_at":"2018-02-27T22:11:40Z","updated_at":"2018-03-01T03:15:11Z","pushed_at":"2018-03-06T19:14:05Z","git_url":"git://github.com/daveshah/stubby.git","ssh_url":"git@github.com:daveshah/stubby.git","clone_url":"https://github.com/daveshah/stubby.git","svn_url":"https://github.com/daveshah/stubby","homepage":"","size":35,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"daveshah:master","ref":"master","sha":"d63f5c19a70c36190318e3fb68103b52563130ce","user":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"repo":{"id":123195032,"name":"stubby","full_name":"daveshah/stubby","owner":{"login":"daveshah","id":949308,"avatar_url":"https://avatars2.githubusercontent.com/u/949308?v=4","gravatar_id":"","url":"https://api.github.com/users/daveshah","html_url":"https://github.com/daveshah","followers_url":"https://api.github.com/users/daveshah/followers","following_url":"https://api.github.com/users/daveshah/following{/other_user}","gists_url":"https://api.github.com/users/daveshah/gists{/gist_id}","starred_url":"https://api.github.com/users/daveshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveshah/subscriptions","organizations_url":"https://api.github.com/users/daveshah/orgs","repos_url":"https://api.github.com/users/daveshah/repos","events_url":"https://api.github.com/users/daveshah/events{/privacy}","received_events_url":"https://api.github.com/users/daveshah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daveshah/stubby","description":"Stubs: Simple, dependable, easy to reason about.","fork":false,"url":"https://api.github.com/repos/daveshah/stubby","forks_url":"https://api.github.com/repos/daveshah/stubby/forks","keys_url":"https://api.github.com/repos/daveshah/stubby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daveshah/stubby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daveshah/stubby/teams","hooks_url":"https://api.github.com/repos/daveshah/stubby/hooks","issue_events_url":"https://api.github.com/repos/daveshah/stubby/issues/events{/number}","events_url":"https://api.github.com/repos/daveshah/stubby/events","assignees_url":"https://api.github.com/repos/daveshah/stubby/assignees{/user}","branches_url":"https://api.github.com/repos/daveshah/stubby/branches{/branch}","tags_url":"https://api.github.com/repos/daveshah/stubby/tags","blobs_url":"https://api.github.com/repos/daveshah/stubby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daveshah/stubby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daveshah/stubby/git/refs{/sha}","trees_url":"https://api.github.com/repos/daveshah/stubby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daveshah/stubby/statuses/{sha}","languages_url":"https://api.github.com/repos/daveshah/stubby/languages","stargazers_url":"https://api.github.com/repos/daveshah/stubby/stargazers","contributors_url":"https://api.github.com/repos/daveshah/stubby/contributors","subscribers_url":"https://api.github.com/repos/daveshah/stubby/subscribers","subscription_url":"https://api.github.com/repos/daveshah/stubby/subscription","commits_url":"https://api.github.com/repos/daveshah/stubby/commits{/sha}","git_commits_url":"https://api.github.com/repos/daveshah/stubby/git/commits{/sha}","comments_url":"https://api.github.com/repos/daveshah/stubby/comments{/number}","issue_comment_url":"https://api.github.com/repos/daveshah/stubby/issues/comments{/number}","contents_url":"https://api.github.com/repos/daveshah/stubby/contents/{+path}","compare_url":"https://api.github.com/repos/daveshah/stubby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daveshah/stubby/merges","archive_url":"https://api.github.com/repos/daveshah/stubby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daveshah/stubby/downloads","issues_url":"https://api.github.com/repos/daveshah/stubby/issues{/number}","pulls_url":"https://api.github.com/repos/daveshah/stubby/pulls{/number}","milestones_url":"https://api.github.com/repos/daveshah/stubby/milestones{/number}","notifications_url":"https://api.github.com/repos/daveshah/stubby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daveshah/stubby/labels{/name}","releases_url":"https://api.github.com/repos/daveshah/stubby/releases{/id}","deployments_url":"https://api.github.com/repos/daveshah/stubby/deployments","created_at":"2018-02-27T22:11:40Z","updated_at":"2018-03-01T03:15:11Z","pushed_at":"2018-03-06T19:14:05Z","git_url":"git://github.com/daveshah/stubby.git","ssh_url":"git@github.com:daveshah/stubby.git","clone_url":"https://github.com/daveshah/stubby.git","svn_url":"https://github.com/daveshah/stubby","homepage":"","size":35,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/4"},"html":{"href":"https://github.com/daveshah/stubby/pull/4"},"issue":{"href":"https://api.github.com/repos/daveshah/stubby/issues/4"},"comments":{"href":"https://api.github.com/repos/daveshah/stubby/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daveshah/stubby/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/daveshah/stubby/statuses/739d9c8f2af27c587fe0b50706131daa21c11e96"}},"author_association":"OWNER"}}
{"actor":{"display_login":"daveshah"}}