{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongoid/pulls/comments/39561339","id":39561339,"diff_hunk":"@@ -170,6 +170,65 @@ class TestClass\n     it \"runs after document instantiation\" do\n       expect(game.name).to eq(\"Testing\")\n     end\n+\n+    context 'when the document is embedded' do\n+\n+      before do\n+        Book.destroy_all\n+      end\n+\n+      after do\n+        Book.destroy_all\n+      end\n+\n+      let(:book) do\n+        book = Book.new({\n+                            :pages => [\n+                                {\n+                                    content: \"Page 1\",\n+                                    notes: [\n+                                                 { message: \"Page 1 / Note A\" },\n+                                                 { message: \"Page 1 / Note B\" }\n+                                             ]\n+                                },\n+                                {\n+                                    content: \"Page 2\",\n+                                    notes: [\n+                                                 { message: \"Page 2 / Note A\" },\n+                                                 { message: \"Page 2 / Note B\" }\n+                                             ]\n+                                }\n+                            ]\n+                        })\n+        book.id = '123'\n+        book.save\n+        book\n+      end\n+\n+      let(:new_message) do","path":"spec/mongoid/interceptable_spec.rb","position":39,"original_position":39,"commit_id":"d504aafd4cb632b9540cc7a0d85caf3501656c66","original_commit_id":"d504aafd4cb632b9540cc7a0d85caf3501656c66","user":{"login":"simi","id":193936,"avatar_url":"https://avatars.githubusercontent.com/u/193936?v=3","gravatar_id":"","url":"https://api.github.com/users/simi","html_url":"https://github.com/simi","followers_url":"https://api.github.com/users/simi/followers","following_url":"https://api.github.com/users/simi/following{/other_user}","gists_url":"https://api.github.com/users/simi/gists{/gist_id}","starred_url":"https://api.github.com/users/simi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simi/subscriptions","organizations_url":"https://api.github.com/users/simi/orgs","repos_url":"https://api.github.com/users/simi/repos","events_url":"https://api.github.com/users/simi/events{/privacy}","received_events_url":"https://api.github.com/users/simi/received_events","type":"User","site_admin":false},"body":"*just nitpick: You can save two lines by using inline block here.*\r\n\r\n```ruby\r\nlet(:new_message) { 'Note C' }\r\n```","created_at":"2015-09-15T20:36:02Z","updated_at":"2015-09-15T20:36:02Z","html_url":"https://github.com/mongodb/mongoid/pull/4151#discussion_r39561339","pull_request_url":"https://api.github.com/repos/mongodb/mongoid/pulls/4151","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/comments/39561339"},"html":{"href":"https://github.com/mongodb/mongoid/pull/4151#discussion_r39561339"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/4151"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongoid/pulls/4151","id":45097447,"html_url":"https://github.com/mongodb/mongoid/pull/4151","diff_url":"https://github.com/mongodb/mongoid/pull/4151.diff","patch_url":"https://github.com/mongodb/mongoid/pull/4151.patch","issue_url":"https://api.github.com/repos/mongodb/mongoid/issues/4151","number":4151,"state":"open","locked":false,"title":"MONGOID-3326 Test to show that #after_initialize issue is resolved","user":{"login":"estolfo","id":699369,"avatar_url":"https://avatars.githubusercontent.com/u/699369?v=3","gravatar_id":"","url":"https://api.github.com/users/estolfo","html_url":"https://github.com/estolfo","followers_url":"https://api.github.com/users/estolfo/followers","following_url":"https://api.github.com/users/estolfo/following{/other_user}","gists_url":"https://api.github.com/users/estolfo/gists{/gist_id}","starred_url":"https://api.github.com/users/estolfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estolfo/subscriptions","organizations_url":"https://api.github.com/users/estolfo/orgs","repos_url":"https://api.github.com/users/estolfo/repos","events_url":"https://api.github.com/users/estolfo/events{/privacy}","received_events_url":"https://api.github.com/users/estolfo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-15T20:22:39Z","updated_at":"2015-09-15T20:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50af1cb3ff57cdf91e8e7fc6e54a8e8e5f9defbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongoid/pulls/4151/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongoid/pulls/4151/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongoid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongoid/issues/4151/comments","statuses_url":"https://api.github.com/repos/mongodb/mongoid/statuses/d504aafd4cb632b9540cc7a0d85caf3501656c66","head":{"label":"estolfo:MONGOID-3326-after-init","ref":"MONGOID-3326-after-init","sha":"d504aafd4cb632b9540cc7a0d85caf3501656c66","user":{"login":"estolfo","id":699369,"avatar_url":"https://avatars.githubusercontent.com/u/699369?v=3","gravatar_id":"","url":"https://api.github.com/users/estolfo","html_url":"https://github.com/estolfo","followers_url":"https://api.github.com/users/estolfo/followers","following_url":"https://api.github.com/users/estolfo/following{/other_user}","gists_url":"https://api.github.com/users/estolfo/gists{/gist_id}","starred_url":"https://api.github.com/users/estolfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estolfo/subscriptions","organizations_url":"https://api.github.com/users/estolfo/orgs","repos_url":"https://api.github.com/users/estolfo/repos","events_url":"https://api.github.com/users/estolfo/events{/privacy}","received_events_url":"https://api.github.com/users/estolfo/received_events","type":"User","site_admin":false},"repo":{"id":42467243,"name":"mongoid","full_name":"estolfo/mongoid","owner":{"login":"estolfo","id":699369,"avatar_url":"https://avatars.githubusercontent.com/u/699369?v=3","gravatar_id":"","url":"https://api.github.com/users/estolfo","html_url":"https://github.com/estolfo","followers_url":"https://api.github.com/users/estolfo/followers","following_url":"https://api.github.com/users/estolfo/following{/other_user}","gists_url":"https://api.github.com/users/estolfo/gists{/gist_id}","starred_url":"https://api.github.com/users/estolfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estolfo/subscriptions","organizations_url":"https://api.github.com/users/estolfo/orgs","repos_url":"https://api.github.com/users/estolfo/repos","events_url":"https://api.github.com/users/estolfo/events{/privacy}","received_events_url":"https://api.github.com/users/estolfo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/estolfo/mongoid","description":"Ruby ODM framework for MongoDB","fork":true,"url":"https://api.github.com/repos/estolfo/mongoid","forks_url":"https://api.github.com/repos/estolfo/mongoid/forks","keys_url":"https://api.github.com/repos/estolfo/mongoid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/estolfo/mongoid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/estolfo/mongoid/teams","hooks_url":"https://api.github.com/repos/estolfo/mongoid/hooks","issue_events_url":"https://api.github.com/repos/estolfo/mongoid/issues/events{/number}","events_url":"https://api.github.com/repos/estolfo/mongoid/events","assignees_url":"https://api.github.com/repos/estolfo/mongoid/assignees{/user}","branches_url":"https://api.github.com/repos/estolfo/mongoid/branches{/branch}","tags_url":"https://api.github.com/repos/estolfo/mongoid/tags","blobs_url":"https://api.github.com/repos/estolfo/mongoid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/estolfo/mongoid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/estolfo/mongoid/git/refs{/sha}","trees_url":"https://api.github.com/repos/estolfo/mongoid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/estolfo/mongoid/statuses/{sha}","languages_url":"https://api.github.com/repos/estolfo/mongoid/languages","stargazers_url":"https://api.github.com/repos/estolfo/mongoid/stargazers","contributors_url":"https://api.github.com/repos/estolfo/mongoid/contributors","subscribers_url":"https://api.github.com/repos/estolfo/mongoid/subscribers","subscription_url":"https://api.github.com/repos/estolfo/mongoid/subscription","commits_url":"https://api.github.com/repos/estolfo/mongoid/commits{/sha}","git_commits_url":"https://api.github.com/repos/estolfo/mongoid/git/commits{/sha}","comments_url":"https://api.github.com/repos/estolfo/mongoid/comments{/number}","issue_comment_url":"https://api.github.com/repos/estolfo/mongoid/issues/comments{/number}","contents_url":"https://api.github.com/repos/estolfo/mongoid/contents/{+path}","compare_url":"https://api.github.com/repos/estolfo/mongoid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/estolfo/mongoid/merges","archive_url":"https://api.github.com/repos/estolfo/mongoid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/estolfo/mongoid/downloads","issues_url":"https://api.github.com/repos/estolfo/mongoid/issues{/number}","pulls_url":"https://api.github.com/repos/estolfo/mongoid/pulls{/number}","milestones_url":"https://api.github.com/repos/estolfo/mongoid/milestones{/number}","notifications_url":"https://api.github.com/repos/estolfo/mongoid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/estolfo/mongoid/labels{/name}","releases_url":"https://api.github.com/repos/estolfo/mongoid/releases{/id}","created_at":"2015-09-14T18:04:04Z","updated_at":"2015-09-14T18:04:07Z","pushed_at":"2015-09-15T20:21:49Z","git_url":"git://github.com/estolfo/mongoid.git","ssh_url":"git@github.com:estolfo/mongoid.git","clone_url":"https://github.com/estolfo/mongoid.git","svn_url":"https://github.com/estolfo/mongoid","homepage":"http://mongoid.org","size":28581,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"095433fa53fc5f770fedb8d28b57fa33b2b2c4dc","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":309009,"name":"mongoid","full_name":"mongodb/mongoid","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/mongoid","description":"Ruby ODM framework for MongoDB","fork":false,"url":"https://api.github.com/repos/mongodb/mongoid","forks_url":"https://api.github.com/repos/mongodb/mongoid/forks","keys_url":"https://api.github.com/repos/mongodb/mongoid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongoid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongoid/teams","hooks_url":"https://api.github.com/repos/mongodb/mongoid/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongoid/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongoid/events","assignees_url":"https://api.github.com/repos/mongodb/mongoid/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongoid/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongoid/tags","blobs_url":"https://api.github.com/repos/mongodb/mongoid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongoid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongoid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongoid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongoid/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongoid/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongoid/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongoid/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongoid/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongoid/subscription","commits_url":"https://api.github.com/repos/mongodb/mongoid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongoid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongoid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongoid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongoid/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongoid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongoid/merges","archive_url":"https://api.github.com/repos/mongodb/mongoid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongoid/downloads","issues_url":"https://api.github.com/repos/mongodb/mongoid/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongoid/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongoid/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongoid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongoid/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongoid/releases{/id}","created_at":"2009-09-16T16:24:56Z","updated_at":"2015-09-14T21:34:22Z","pushed_at":"2015-09-15T20:22:39Z","git_url":"git://github.com/mongodb/mongoid.git","ssh_url":"git@github.com:mongodb/mongoid.git","clone_url":"https://github.com/mongodb/mongoid.git","svn_url":"https://github.com/mongodb/mongoid","homepage":"http://mongoid.org","size":28581,"stargazers_count":3265,"watchers_count":3265,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1126,"mirror_url":null,"open_issues_count":301,"forks":1126,"open_issues":301,"watchers":3265,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/4151"},"html":{"href":"https://github.com/mongodb/mongoid/pull/4151"},"issue":{"href":"https://api.github.com/repos/mongodb/mongoid/issues/4151"},"comments":{"href":"https://api.github.com/repos/mongodb/mongoid/issues/4151/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/4151/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongoid/pulls/4151/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongoid/statuses/d504aafd4cb632b9540cc7a0d85caf3501656c66"}}}}