{"action":"closed","number":24690,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/24690","id":67531191,"html_url":"https://github.com/rails/rails/pull/24690","diff_url":"https://github.com/rails/rails/pull/24690.diff","patch_url":"https://github.com/rails/rails/pull/24690.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/24690","number":24690,"state":"closed","locked":false,"title":"Support nested time travel helpers","user":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"body":"Currently travel time helpers don't restore to proper previous state if we have called them in a row, or in a nested fashion.\r\n\r\nWe simply unstub all previous occurrences. Consider following scenario:\r\n```ruby\r\n travel_to outer_expected_time do\r\n     travel_to inner_expected_time do\r\n         #perform some operations from some state here\r\n       end\r\n   #perform some operations from some outer state here\r\n end\r\n```\r\n\r\nThis will fail for outer scenario in that, we simply just unstub all stubbed objects.\r\nHere onwards we also take into account the object into account to create alias, to be more safe in returning back to previous states.\r\n\r\nFixes #24689","created_at":"2016-04-22T15:37:19Z","updated_at":"2016-05-21T12:03:30Z","closed_at":"2016-05-21T12:03:30Z","merged_at":null,"merge_commit_sha":"1a931e4bb76de23b240b300cd7ccdb657d2be38e","assignee":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/24690/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/24690/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/24690/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/204c041693422d3402fcaa1583e5f4ded40fa3a5","head":{"label":"vipulnsward:24689-allow-nested-travel-to","ref":"24689-allow-nested-travel-to","sha":"204c041693422d3402fcaa1583e5f4ded40fa3a5","user":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"repo":{"id":6652536,"name":"rails","full_name":"vipulnsward/rails","owner":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vipulnsward/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/vipulnsward/rails","forks_url":"https://api.github.com/repos/vipulnsward/rails/forks","keys_url":"https://api.github.com/repos/vipulnsward/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vipulnsward/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vipulnsward/rails/teams","hooks_url":"https://api.github.com/repos/vipulnsward/rails/hooks","issue_events_url":"https://api.github.com/repos/vipulnsward/rails/issues/events{/number}","events_url":"https://api.github.com/repos/vipulnsward/rails/events","assignees_url":"https://api.github.com/repos/vipulnsward/rails/assignees{/user}","branches_url":"https://api.github.com/repos/vipulnsward/rails/branches{/branch}","tags_url":"https://api.github.com/repos/vipulnsward/rails/tags","blobs_url":"https://api.github.com/repos/vipulnsward/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vipulnsward/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vipulnsward/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/vipulnsward/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vipulnsward/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/vipulnsward/rails/languages","stargazers_url":"https://api.github.com/repos/vipulnsward/rails/stargazers","contributors_url":"https://api.github.com/repos/vipulnsward/rails/contributors","subscribers_url":"https://api.github.com/repos/vipulnsward/rails/subscribers","subscription_url":"https://api.github.com/repos/vipulnsward/rails/subscription","commits_url":"https://api.github.com/repos/vipulnsward/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/vipulnsward/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/vipulnsward/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/vipulnsward/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/vipulnsward/rails/contents/{+path}","compare_url":"https://api.github.com/repos/vipulnsward/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vipulnsward/rails/merges","archive_url":"https://api.github.com/repos/vipulnsward/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vipulnsward/rails/downloads","issues_url":"https://api.github.com/repos/vipulnsward/rails/issues{/number}","pulls_url":"https://api.github.com/repos/vipulnsward/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/vipulnsward/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/vipulnsward/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vipulnsward/rails/labels{/name}","releases_url":"https://api.github.com/repos/vipulnsward/rails/releases{/id}","deployments_url":"https://api.github.com/repos/vipulnsward/rails/deployments","created_at":"2012-11-12T11:42:33Z","updated_at":"2015-01-14T06:40:25Z","pushed_at":"2016-05-21T08:50:26Z","git_url":"git://github.com/vipulnsward/rails.git","ssh_url":"git@github.com:vipulnsward/rails.git","clone_url":"https://github.com/vipulnsward/rails.git","svn_url":"https://github.com/vipulnsward/rails","homepage":"http://rubyonrails.org","size":126328,"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":"rails:master","ref":"master","sha":"fe1eda64e506f371224930db3a418bcf07a940f4","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","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,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","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":"2016-05-21T08:53:11Z","pushed_at":"2016-05-21T12:02:03Z","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":341971,"stargazers_count":31226,"watchers_count":31226,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12663,"mirror_url":null,"open_issues_count":985,"forks":12663,"open_issues":985,"watchers":31226,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/24690"},"html":{"href":"https://github.com/rails/rails/pull/24690"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/24690"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/24690/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/24690/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/24690/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/204c041693422d3402fcaa1583e5f4ded40fa3a5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":6,"review_comments":12,"commits":1,"additions":71,"deletions":12,"changed_files":3}}
{"actor":{"display_login":"rafaelfranca"}}